ASP.NET重定向Url仅当出现问题时/
我有这个网址:http://my_url.fr/ 我想重定向到http://my_url.fr/app_offline.html 如果人们在url后面写东西 例:ASP.NET重定向Url仅当出现问题时/,asp.net,regex,url-rewriting,Asp.net,Regex,Url Rewriting,我有这个网址:http://my_url.fr/ 我想重定向到http://my_url.fr/app_offline.html 如果人们在url后面写东西 例: http://my_url.fr/page/creation.aspx重定向到http://my_url.fr/app_offline.html http://my_url.fr/test.aspx重定向到http://my_url.fr/app_offline.html 下面是我对web.config的重写规则: <syste
http://my_url.fr/page/creation.aspx
重定向到http://my_url.fr/app_offline.html
http://my_url.fr/test.aspx
重定向到http://my_url.fr/app_offline.html
下面是我对web.config的重写规则:
<system.webServer>
<rewrite>
<rules>
<rule name="asp_to_aspx" stopProcessing="true">
<match url="MATCH" />
<action type="Redirect" url="http://my_url.fr/app_offline.html" />
</rule>
</rules>
</rewrite>
</system.webServer>
我可以设置什么来代替MATCH来重定向.fr之后的所有路径
谢谢如果您想在主机之后匹配任何内容,请使用
<match url=".*" />