kill-www
18 April 2006
kill-www
Ever notice how this website never lets you go to http://www.brettpeters.org? You always end up at http://brettpeters.org?
Yeah. I’m sneaky like that. Add the following (with appropriate substitutions) to your .htaccess file:
# kill the www prefix:
RewriteEngine on
RewriteCond %{HTTP_HOST} "^www"
RewriteRule ^(.*) http://example.com/$1 [R=301]
This is: brett's logjam → kill-www.