Redirect Visitors From Non-WWW To WWW Version Of Your Website With .htaccess And mod_rewrite
Saturday, January 20th, 2007Apache’s mod_rewrite module is a very powerful tool. And there’s some neat tricks you can do with it. This trick involves forcing visitors and search engine robots to either the WWW version of your website, www.yourdomain.com, or the non-WWW version of your website, yourdomain.com.
This is probably not something you want to change up after your site has been up for a while, but something you should think about in the development stages of your website. Changing this after you’ve already been indexed can have some unwanted efffects, like loss of PageRank or a complete removal and then reindex of your website by the search engine bots.