How to redirect a localhost url to an external site.
Hi,
First I would like to share the background details of my scenario.
I have an web application and client have been using it. Now there is an extension to it and we host that application with new domain name. For the clients that hit the old url, we want to show them a new landing page (this is not part of out application, its an external page) that has information about the new Url and the link. Client can click on the new Url link in order to use the application.
How can I achieve it. I thought of using IIS URL rewrite module. Firstly I wanted to verify it in locally hosted application. I have written and URL rewrite rule as below.
- On the server level, I have created one URL rewrite rule as below.
- Wildcard pattern: */<my virtual directory name>/
- Action Type: Redirect.
- Rewrite Url: External site link.
- I restarted the IIS.
- In browser I accessed the locally hosted application. But it just shows the normal application did not take me to the external site link.
- As part of troubleshooting, though in IIS ARR I enabled the proxy on the server , still url redirection did not happen.
Questions:
- What is the problem. Why Url redirection did not work? Did I miss something.
- If I un-host/delete my locally hosted application in IIS, using Url redirect rule will I be able to redirect to external Url when IIS receives request for the locally hosted application?
Thanks in advance.