[lang_de]Dieser Eintrag ist nur auf Englisch verfügbar.[/lang_de]
You may or may not have heard about the no-www movement. All my sites have always been reachable with and without the www prefix, and I personally never use the www prefix if I can avoid it. I won’t get into the details of why it is a bad idea, but consider this: no one calls the web ‘WWW’ anymore, and this ‘abbreviation’ is a lot longer than the expansion (‘double-you double-you double-you’ vs ‘world wide web’). If anything, the prefix should be ‘web’.
Starting today, I’m having all my domains permanently redirect to the non-www version of the hostname.
Here’s a simple mod_rewrite recipe that should work for any domain:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L,NS]
Put it inside a a <Location "/">
block in the appropriate VirtualHost
block, or inside.htaccess
in the document root of your site (it doesn’t seem to work in a VirtualHost block in the server config, any ideas why?).
It’s like magic.
didnt the mutant always do that?
besides, i never understood why sites dont have it by default
I never type the WWW, anyway, and I’m always slightly annoyed, if sites aren’t reachable without it. Didn’t know there was a whole organized group though.
The mutant was always reachable with and without prefix, but it didn’t redirect.
(It still doesn’t, only moeffju.net and sibling sites do.)
Hi Matt, long time no see 🙂 How are you??
Well… I never liked the http://www... it’s annoying.
We could not get this to work in the apache configuration file but it seems to work just fine in an .htaccess file.
You should remove the image from comments if it is a trackback rather than showing the big ?, maybe show a trackback image or something to visually seperate them.