
Originally Posted by
bogart
One of these should work
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.domain\.co\.uk [NC]
RewriteRule ^(.*)$ http://www.domain.com$1 [L,R=301]
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain\.co\.uk [NC]
RewriteRule ^(.*)$ http://www.domain.com$1 [L,R=301]
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.eesonline\.co\.uk [NC]
RewriteRule ^(.*)$ http://www.eesonline.co.uk$1 [L,R=301]
Adding the first batch of code to the htaccess file caused this problem when trying to redirect from the www version to the none www version:
Sorry! We could not find www.eesonline.co.ukeesonline.co.uk
Its almost like its trying to link to itself?
Adding the second batch
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^eesonline\.co\.uk [NC]
RewriteRule ^(.*)$ http://www.eesonline.co.uk$1 [L,R=301]
Results in the same error as in the first example.
I really can't see what's going wrong here at all.
Bookmarks