PDA

View Full Version : How to redirect non-www pages to www pages ?


logicuk
03-29-2008, 10:21 AM
Hello

I want to redirect all the non-www forum url's including the main page, to www. Is there a mod/hack to do this for me

Any advice/help is appreciated. Thank You.

royo
03-29-2008, 11:14 AM
The following should be added in your .htaccess file. Make sure you back it up first in case you mess something up.

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

Replace domain.com with your website. This is how it should be done as far as I recall.