Iis 7 IIS Url重写规则
我是新的Url重写规则,所以任何帮助将不胜感激 希望创建一个IIS Url重写,该重写将处理以下任何一项Iis 7 IIS Url重写规则,iis-7,url-rewriting,Iis 7,Url Rewriting,我是新的Url重写规则,所以任何帮助将不胜感激 希望创建一个IIS Url重写,该重写将处理以下任何一项 http://localhost/homepage/contact-us.aspx -> http://localhost/contact-us.aspx http://localhost/homepage/about-us.aspx -> http://localhost/about-us.aspx 有什么想法吗?我还没有测试过这个,但我认为您的web.config文件中会有
http://localhost/homepage/contact-us.aspx -> http://localhost/contact-us.aspx
http://localhost/homepage/about-us.aspx -> http://localhost/about-us.aspx
有什么想法吗?我还没有测试过这个,但我认为您的web.config文件中会有类似的内容 您可以编辑web.config文件,然后进入IIS,如果要测试该规则,则应显示该规则
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="rewriterule1" enabled="true" stopProcessing="false">
<match url="homepage/(.*)" />
<action type="Rewrite" url="http://localhost/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>