Mugshot

Hey I'm Lee. My blog was put up to house useful nuggets I could refer back to, document my learning curves on new technologies and house tutorials I write for Umbraco and other .NET stuff.

All thoughts and comments on here are my own, and in no way reflect my employer - I also take no responsibility for spelling, grammar or terminology, so read at your own risk!

Blogs I Read

Sites I Like

ISAPI enforce www. domain

Following on from my other post about URL Tips for asp.net websites, here is another good little ISAPI rule which I got from Receptional.

I used to set up the non www. domain to 301 redirect via IIS which is a pain as you then have two unnecessary entries.  This solves the problem :)

RewriteCond %{HTTP_HOST} !^(www\.yourdomainname\.co\.uk)?$
RewriteRule (.*) http://www.yourdomainname.co.uk/$1 [R=301,L,CL]

I’ll keep trying to add ISAPI nuggets as and when I find them, mainly for my own future reference.

Back to top