corner image corner image
Thread: .htaccess file
View Single Post
corner image corner image
  #2 (permalink)  
Old 28-07-2008, 18:11
yorkshiresource yorkshiresource is offline
UKSBF Convert
 
Join Date: May 2008
Posts: 11
Thanks: 2
Thanked 7 Times in 3 Posts
This might be a slightly different issue than the normal www 301 redirect would solve - but I've copied in the code I use below anyway.

In your case the non www version isn't resolving to your server, so the browser is never going to get to the htaccess file to prompt the redirect. The 301 redirect will only work where the non www version is already working, but you'd prefer all pages to start with www

Possibly server/host related. Setups can be very different, but in general there needs to be DNS settings for both www and non www

Did you configure these? or your host? they may be the best people to try next.


RewriteEngine on

RewriteCond %{HTTP_HOST} ^yourdomain\.co.uk$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.co.uk/$1 [R=301,L]

Rich
__________________
Yorkshire Business Directory
Yorkshiresource


Reply With Quote
corner image corner image