# HG changeset patch # User Steve Losh # Date 1264274229 18000 # Node ID bba73143f4b1647a24198fecaa9357f8077896e9 # Parent 310bcfd9183d0639c2c687cbf111db77f1829c77 Www is evil. Kill it with mod_rewrite. diff -r 310bcfd9183d -r bba73143f4b1 content/.htaccess --- a/content/.htaccess Fri Jan 22 20:12:59 2010 -0500 +++ b/content/.htaccess Sat Jan 23 14:17:09 2010 -0500 @@ -1,7 +1,10 @@ -{% if GENERATE_CLEAN_URLS %} RewriteEngine on RewriteBase {{ node.site.settings.SITE_ROOT }} +# www is evil and must be abolished +RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] +RewriteRule ^(.*)$ http://%1/$1 [R=301,L] + # Old URLs RewriteRule ^blog/entry/(\d+)/(\d\d)/\d+/([^/]*)/?$ /blog/$1/$2/$3/ [R=301,L] RewriteRule ^blog/entry/(\d+)/(\d)/\d+/([^/]*)/?$ /blog/$1/0$2/$3/ [R=301,L] @@ -16,6 +19,4 @@ RewriteCond %{REQUEST_FILENAME}.html -f RewriteRule ^.*$ %{REQUEST_FILENAME}.html -{% endif %} - ErrorDocument 404 /404.html \ No newline at end of file