Organizational Research By

Surprising Reserch Topic

.htaccess rewrite to redirect root URL to subdirectory


Trying to get

www.example.com

to go directly to

www.example.com/store

I have tried multiple bits of code and none work. Please help!

What I've tried:

Options +FollowSymlinks
RewriteEngine on

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

RewriteCond %{HTTP_HOST} ^(.+)\www.example\.com$
RewriteRule ^/(.*)$ /samle/%1/$1 [L]

asked Apr 18, 2015 in htaccess by rajesh
0 votes
44 views



Related Hot Questions

6 Answers

0 votes
NULL
answered Apr 18, 2015 by rajesh
0 votes
NULL
answered Apr 18, 2015 by rajesh
0 votes
NULL
answered Apr 18, 2015 by rajesh
0 votes
NULL
answered Apr 18, 2015 by rajesh
0 votes
NULL
answered Apr 18, 2015 by rajesh
0 votes
NULL
answered Apr 18, 2015 by rajesh

...