简体   繁体   中英

IIS Redirect requests from domain to other domain

I have a MVC website published on IIS and its domain name is for example www.example.com.sa and I need to redirect any requests to www.example.sa also if any user request any url like the following:

This rule can judge www.example.com.sa and redirect it.

<rule name="redirect rule" stopProcessing="true">
                <match url="(.*)" />
                <conditions>
                    <add input="{HTTP_HOST}" pattern="www.example.com.sa" />
                </conditions>
                <action type="Redirect" url="http://www.example.sa/{R:0}" />
 </rule>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM