I have an asp.net application deployed under IIS 7.5 Version with several sub domains under it. I would like to redirect a particaular subdomain to another url.
For example:
www.domain1.com/a
www.domain1.com/b
The above urls should work fine.
www.domain1.com/c
should be redirected to www.domain2.com
How can i achieve this?
Update on my requirement: I have same application deployed for several users (a, b, c) with same application pool. I would like to have redirect for only user c.
Open the IIS manager. Open the Run dialog (Windows+R), type inetmgr
and press Enter
. You will need Adminstrator privileges for this.
Select the sub-folder (not virtual folder) within your website in the left pane (by clicking on the folder name) and then open HTTP Redirect
in the main view.
Select Redirect requests to this destination
and type in your destination domain name http://www.domain2.com/
. Check the other options (if they are applicable to you) and click Apply
to save.
Check the redirection in your browser.