I'm having trouble forcing www with subfolders. I have the rule setup and working in the web root but it seems to ignore this for any subfolder with its own .htaccess. This is the case even if the subfolder's .htaccess has only
- Code: Select all
RewriteEngine on
the rule i used is
- Code: Select all
RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/folder/$1 [L,R=301]
not only do subfolders ignore it they in fact revert to domain.com/folder if www.domain.com/folder is requested.
I've tried the same rule in the sub folder as in the web root with the sub folder appended but this still causes problems. In fact if I go to domain.com/folder to redirects to www.domain.com/folder//server/user/public_html/folder with the server path.
Any insight would be much appreciated
Thanks[/code]