Jump to content

.htaccess for subfolders - non-www to www problem


themistral

Recommended Posts

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!  ;)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.