warrenerjm Posted March 19, 2007 Posted March 19, 2007 Hello I think I have both the http://mysite & www.mysite listed in places. I have read this will count as two sites & split my ratings. I found this & would like to know is this is what I should do? I do not understand what it is doing very well. :blush: My includes/configure.php doesn't have the www. before my site name. Is this wrong too? Will doing this make things worse or hopefully better, although I am being found quite well. Maybe I would have suffered later? A) Installing the Non-WWW 301 Redirect on a Apache ServerDownload the .htaccess file from your website's root web folder to a folder on your machine where you can edit it. Make a copy of the .htaccess file and save it somewhere else for safe keeping in case you need to revert to the old version - do not edit this version. Open the original .htaccess you downloaded in Notepad Add the following code (in red) into the .htaccess file. Be sure to substitute "example.com" with your own website information but touch nothing else. RewriteEngine On RewriteCond %{HTTP_HOST} ^example.com RewriteRule (.*) http://www.example.com/$1 [R=301,L] Upload the file back to your website in the exact same place you downloaded it. Once the upload is complete open a browser and try visiting the "non-www" version of your website address. If the .htaccess is working as it should you will be redirected immediately to the proper "www" version of your website. This will be reflected in your browser's address bar. To be 100% certain this has worked appropriately I suggest visiting this URL and typing in your "non-www" website address into the HTTP Server Header Checker. This tool will show you whether the 301 redirect is being provided by the server. This is what a search engine will see when it visits the site. The result should look like the following areas in red: #1 Server Response: http://example.com HTTP Status Code: HTTP/1.1 301 Moved Permanently Date: Wed, 14 Mar 2007 22:49:28 GMT Server: Apache/1.3.27 (Unix) PHP/4.4.1 FrontPage/5.0.2.2510 mod_ssl/2.8.14 OpenSSL/0.9.6b Location: http://www.example.com/ Connection: close Content-Type: text/html; charset=iso-8859-1 Redirect Target: http://www.example.com/ #2 Server Response: http://www.example.com/ HTTP Status Code: HTTP/1.1 200 OK Date: Wed, 14 Mar 2007 22:49:28 GMT Server: Apache/1.3.27 (Unix) PHP/4.4.1 FrontPage/5.0.2.2510 mod_ssl/2.8.14 OpenSSL/0.9.6b Connection: close Content-Type: text/html If the redirect worked you are done! Congratulations. If this has not worked you need to restore the backup you made of the .htaccess file to your website. After the backup is restored go back and review the revised .htaccess on your computer, compare the information to the instructions above and make sure there were no mistakes. If no mistakes are found your server may require custom programming which is beyond the scope of this FAQ; please contact your hosting provider for more information Thank you for all your useful & knowlegable comments on this. :thumbsup: Julie
warrenerjm Posted March 19, 2007 Author Posted March 19, 2007 Does anyone have any words of advise please? ;) Thanks
warrenerjm Posted March 21, 2007 Author Posted March 21, 2007 I'm seeing or noticing more & more of BOTH now. Please could anyone give me any advise what I have done or should do? A starting point...anything? Thanks ;)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.