URL rewrite and the www subdomain

added by Paul Wheeler
4/1/2014 12:44:11 PM

2 Kicks, 94 Views

The web.config makes it easy for us to either enforce or remove the www subdomain using URL rewrites. There are many examples online on how to do this, but they all share 2 fundamental flaws. The rules have a direct dependency to the domain name and they don't work with both HTTP and HTTPS.


1 comments

Robert Greyling
4/1/2014 1:03:16 PM
So simple! I wish they had the default for this in IIS as it must be close to the most common rewrite rule there is in existence today. The built-in Canonical rule in IIS redirects ALL traffic, even your localhost traffic which is so damn annoying!