I was doing simple 301 redirect earlier to redirect my sites root to a sub folder but today I found that it was actually also redirecting subdomain too.. old redirect I was using : redirect 301 /index.php http://www.domain.com/subfolder/ Code (markup): So I decided to get rid of it and now I want to redirect www.domain.com and domain.com to be redirected to : www.domain.com/subfolder/ I used following but it is only redirecting "domain.com" to "www.domain.com/subfolder/" but not redirecting "www.domain.com" to "www.domain.com/subfolder" ... RewriteCond %{http_host} ^domain.com$ [nc] Rewriterule ^(.*)$ http://www.domain.com/subfolder/$1 [r=301,nc] Code (markup): Kindly guide..
what about the following: RewriteCond %{http_host} ^www.domain.com$ [NC,OR] RewriteCond %{http_host} ^domain.com$ [NC] Rewriterule ^(.*)$ http://www.domain.com/subfolder/$1 [R=301,NC] Code (markup):
Hi.. man.. I tried that too but problem ws that it won't let any other folder work.. ie. if I try to open www.domain.com/anyotherfolder then it won't . In short any other folder than /subfolder is not working..