How would you implement redirects for domain canonicalization, no-www, and HTTPS for IIS 7.5

by user255136   Last Updated September 05, 2019 17:04 PM

For the moment I'm stuck with an IIS-server, unfortunately not my best subject (I'm much better w. Apache). We have a site on a Win 2008 R2 Server with IIS 7.5. It's an old site and we are working on a new site on a new server. But until the new site is up and running, we need the old site.

The company has the name "examplesite" but is called "example".

I have 8 URLs, with all combinations of:

  • HTTP and HTTPS
  • www and no-www
  • example.com and examplesite.com

And I want, no matter what you write in a web browser's address bar, you will go to:

https://example.com

I have tried for a couple of days now with both rewrite and redirect and I can't get it working. (I get some of the addresses working correctly, but not all)

Please, how do I fix this?



Related Questions


Updated April 30, 2015 21:01 PM

Updated June 17, 2015 23:01 PM

Updated January 23, 2018 22:04 PM

Updated August 07, 2016 08:03 AM

Updated August 08, 2016 08:03 AM