Say I have a website which’s url is http://test.com/myWeb. We want clients to access this site via http://myWeb.test.com. To accomplish this, we can setup HTTP redirect.
- First say we create a new site [TestIISRedirectSites] with a virtual directioy [TestSite]
- Selecct [TestIISRedirectSites] on the Connections panel, then click on [Bindings…] on the Actions panel, this brings out a [Site bidings] dialog box
- Click on the [Edit] button to edit the site properties, give this site a validate host name here then click [OK].
- Now close the dialog, double click on HTTP Redirect on the IIS tab
- On the HTTP Redirect property panel, chekc the [Redirect requests to this destiontion] checkbox, and in the textbox bellow, type [http://test.com/TestSite]
- Also, check redirect behavior checkboxs and give each request a status code, here I just put a 302(Found)
- Apply these changes
Try browser this site via http://test.com:8080 , it will then be redirected to http://test.com:8080/TestSite