Posted By

RainyDayMedia on 10/05/11


redirect htaccess apache root

Versions (?)

.htaccess Redirect ROOT to subdirectory

 / Published in: Apache


I found this useful. Works as expected.

  1. Options +FollowSymlinks
  2. RewriteEngine on
  3. RewriteCond %{HTTP_HOST} ^example\.com$
  4. RewriteRule (.*)$1 [R=301,L]
  5. RewriteRule ^$ store [L]
  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.