I have never really thought about it before, but I hardly ever type ‘WWW’ into an address bar. Out of habit I skip this part of any URL. It has never caused me any problems till this week, for one of my own websites.
As I’ve said in an earlier post, I have added OpenID support to one of my websites. I used the DotNetOpenId library. This library made the development very easy and was up and running in no time on my development machine. But recently I have published the website to a live server and things haven’t been going that smoothly.
Redirecting turned out to be easier than I thought (I didn’t need to contact hosting provider). I just added a ‘.htaccess‘ file to the root of my directory with the following lines
RewriteEngine OnRewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
This tip I got from no-www.org.

