views:

14

answers:

1

I have two folders in httpdocs

site_v1
site_v2

I would like to redirect the entire domain to site_v2 but also to keep reference to this

so this would work

www.example.com -> gets into site_v2
www.example.com/site_v1/ -> gets into site_v1
www.example.com/site_v2/ -> gets into site_v2

How would be the htaccess directives for this kind of redirect?

+2  A: 

Try this rule:

RewriteCond $0 !^(site_v1|site_v2)($|/)
RewriteRule .* site_v2/$0 [L]
Gumbo