What is the recommended method of HTTP Redirection from multiple URLs to one URL?

Posted by ChrisHDog on Stack Overflow See other posts from Stack Overflow or by ChrisHDog
Published on 2010-05-06T07:04:05Z Indexed on 2010/05/06 7:08 UTC
Read the original article Hit count: 388

I have a website that has a number of URLs that people use to connect to that site (uses the bindings on the IIS website and everything works as intended):

Now what I want to do is have all of the URLs go to https://www.sample.com - so if you type in "http://xyz.sample.com" or "sample.com" you should go to https://www.sample.com

The question is what is the best mechanism to do this? I have one possible solution (which I will put as an answer to this question), but I get the feeling that there might be another, better solution available.

© Stack Overflow or respective owner

Related posts about iis7

Related posts about http-redirect