|
Written by Fr. Robert
|
|
Friday, 08 May 2009 05:45 |
|
As you may have found out many hosting companies will allow you to a access your site with the URL of http://www.yoursite.com or http://yoursite.com. This feature often makes search engines and reporting tools think you have two identical sites rather then one site resulting in penalties from the search engines and separate reports for your site from your reporting tool. A quick edit of your .htaccess file for your Joomla site will redirect all the traffic from http://yoursite.com to http://www.yoursite.com.
Open the file .htaccess with your online editor
find the line
RewriteEngine On
directly underneath that line add the following two lines
rewriteCond %{HTTP_HOST} ^yoursite\.com$ rewriteRule ^.*$ http://www.yoursite.com%{REQUEST_URI} [R=permanent,L]
You must have the lines that order otherwise it will not work. Also change the code to list your site rather then yoursite.com
Save the file.
Now if you go to your site without the www it should redirect you to the same url except with the www
|
|
Last Updated on Thursday, 13 August 2009 09:33 |