UPDATE: this will do a redirect, not a reset variable. I will not delete this answer as I think it is neat, but it does not answer exactly what you want
I make it very easy for Economist.com
You have two IIS sites for one site, they have the same website. The main IIS website remains the same as listening to the current host header, for example.
216.35.68.215 economist.com
and another IIS site listens for the IP address with the other headers entered.
i.e.
216.35.68.215 economist.co.uk
The second web slave in the Home Directory has a set of redirects that will correct any host name that people come to your site to
Set "Exact URL Above" and "Permanent Redirection for this Resource" and enter your full hostname entry as follows
http://www.economist.com $ S $ Q
$ S $ Q will support all the URLs of your other host names.
Feel free to test this
http://www.economist.co.uk/world/americas/
just push you to
http://www.economist.com/world/americas/
This means that you do not need to run, at least for this reason, the rather expensive IIS rewrite module
Stewart robinson
source share