.htaccess, point root to sub directory


/ Published in: Apache
Save to your folder(s)



Copy this code and paste it in your HTML
  1. RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC,OR]
  2. RewriteCond %{HTTP_HOST} ^domain\.com$
  3. RewriteCond %{REQUEST_URI} !subdir/
  4. RewriteRule (.*) /subdir/$1 [L]

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.