【发布时间】:2011-07-29 21:02:51
【问题描述】:
我在 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/ 并发送到例如 home.aspx。谁能帮我匹配正则表达式
【问题讨论】:
标签: iis-7 url-rewriting