IIS 7 and Above
URL Rewrite Module
URL Rewrite SubDirectory
Last post Jun 09, 2020 07:26 AM by Yuk Ding
Jun 09, 2020 03:15 AM|chrissezhi|LINK
Hello all -
Total noob here so step by step would be beneficial. I am wanting to do the following:
We have an old domain lets say
http://portal.acme.com/pages/login.aspx (this may have been saved in favorites etc. ) what we want to do is when the request comes in - how do we just change to portal.acme.com (stripping the subdirectory away)?
Jun 09, 2020 07:26 AM|Yuk Ding|LINK
Do you just want to redirect http://portal.acme.com/pages/login.aspx to http://portal.acme.com/ ?
1.Please install URL rewrite module from here:
2.Put this redirect rule to web.config <system.webserver> section.
<rule name="Redirect rule" stopProcessing="true">
<match url="pages/login.aspx" />
<action type="Redirect" url="/" />
If the reply is helpful, it is appreciated if you could mark it as answer.