Mr Portman

School website critiques, articles on education and some random cod

Adding www to every url

Tags: ,

Date: 4th May, 2010

Damn it, I hate ‘www’, but someone was insisting on only using it. Here’s the .htaccess code:

RewriteCond %{REQUEST_URI} !^/(robots\.txt|favicon\.ico|sitemap\.xml)$
RewriteCond %{HTTP_HOST} !^www\.mrportman\.co\.uk$ [NC]
RewriteRule ^(.*)$ http://www.mrportman.co\.uk/$1 [R=301,L]

August 2010

July 2010

June 2010

May 2010

April 2010

February 2010

January 2010

December 2009

November 2009

October 2009

September 2009