.htaccess Redirect ROOT to subdirectory

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

I found this useful. Works as expected.

Copy this code and paste it in your HTML
  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]
  7. #If you want an external redirect, set the R flag there as well
  8. #RewriteRule ^$ /store [L,R=301]

URL: http://rnydm.us/pruC5b

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.