Posted By

RainyDayMedia on 10/05/11


Tagged

redirect htaccess apache root


Versions (?)

.htaccess Redirect ROOT to subdirectory


 / Published in: Apache
 

URL: http://rnydm.us/pruC5b

I found this useful. Works as expected.

  1. Options +FollowSymlinks
  2. RewriteEngine on
  3. RewriteCond %{HTTP_HOST} ^example\.com$
  4. RewriteRule (.*) http://www.example.com/$1 [R=301,L]
  5. RewriteRule ^$ store [L]
  6.  
  7. #If you want an external redirect, set the R flag there as well
  8. #RewriteRule ^$ /store [L,R=301]

Report this snippet  

You need to login to post a comment.