themistral Posted November 17, 2010 Share Posted November 17, 2010 Hi guys, I have a site with htaccess working without problems to redirect non-www to www RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} ^domain.com [NC] RewriteRule ^(.*) http://www.domain.com/$1 [R=301,L] This works for all of the site bar one directory. The directory that doesn't work has a different htaccess file as it uses a different application to the main site. I have added the same code in but it's not working... RewriteEngine on RewriteBase /sub_folder/ RewriteCond %{HTTP_HOST} ^domain.com [NC] RewriteRule ^(.*) http://www.domain.com/$1 [R=301,L] I know this is going to be something really stoopid that I have done, so please, any help gratefully appreciated! Link to comment https://forums.phpfreaks.com/topic/218973-htaccess-for-subfolders-non-www-to-www-problem/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.