View Single Post
  #19 (permalink)  
Old 14-11-2009, 11:22
Wes Wes is offline
Member
 
Join Date: Aug 2007
Posts: 84
Default

Hi Northern,
To be honest, the more I read on the matter, the more confused I became. In the end I just created files in notepad named .htaccess and uploaded one to the root of each site in cpanel with the code below on each - of course after changing the two areas for the relevant site name info each time. This now has the effect of making my site url revert to the www. version ( namely www.mysite.co,uk) instantly in my browser address bar when I type in the non www. version ( namely mysite.co.uk)
I got a bit confused at first trying to save the .htaccess files when I created them until I realised you have to set the file type to 'all files'.


RewriteEngine On
RewriteCond %{HTTP_HOST} ^yoursite.com
RewriteRule (.*) http://www.yoursite.com/$1 [R=301,L]
Reply With Quote