Redirect root URL to subdirectory using .htaccess

To redirect you main URL to a subdirectory, simply use the following code in your .htaccess file.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
RewriteRule ^$ store [L]

mirkohumbert

Comments

No comments yet.

Write a comment

You must be logged in to write a comment.

« »