IIS 7 HTTP redirect with empty site

The idea is to create a new site with no real documents to look at, that is purely for re-directing one URL.  It took me a few tries to get this working, so I thought I would document the steps.  In the example we'll be redirecting a.axvius.com to https://b.axvius.com

  1. Create a new site in IIS7.  Pick a name, point the Physical Path to the folder you just created, and a.axvius.com in the Host name box.
  2. Double-click on HTTP Redirect (in the lower half of the pane when you have the site you just created selected).  Check the first box, and put https://b.axvius.com in the box.  Check the box that reads "Redirect all requests to exact destination."  Change the drop-down to permanent.  Click apply.
  3. Notice that it created a web.config file in the folder you created.
  4. May need to restart the site.
  5. Create a folder for the site.
  6. Give the Network Service and IUSR users read access to the folder.  Note that your mileage may vary; I have historically had a difficult time with IIS file permissions.

Not too difficult really.  I tried to do it without a folder first, and was thwarted by file permissions after that.

Tags