我在 IIS7 中有以下规则:
<rule name="RewriteAll" stopProcessing="true">
<match url="^([^/]+)/?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{URL}" negate="true" pattern="\.axd$" />
<add input="{URL}" negate="true" pattern="\.png$" />
<add input="{URL}" negate="true" pattern="\.gif$" />
<add input="{URL}" negate="true" pattern="\.jpg$" />
<add input="{URL}" negate="true" pattern="\.css$" />
<add input="{URL}" negate="true" pattern="\.js$" />
</conditions>
<action type="Rewrite" url="default.aspx?page={R:1}" />
</rule>
捕获像这样的网址http://mysite.com/contact/ http://mysite.com/contact/
我不知道用什么规则来捕捉http://mysite.com/ http://mysite.com/并发送到例如 home.aspx。谁能帮我匹配正则表达式
我通过添加以下规则来修复它:
<rule name="Index Request" enabled="true" stopProcessing="true">
<match url="^$" />
<action type="Rewrite" url="index.aspx" logRewrittenUrl="true" />
</rule>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)