.net 整个目录的Iis7 URL重写,剥离索引.aspx

.net 整个目录的Iis7 URL重写,剥离索引.aspx,.net,iis-7,rewrite,.net,Iis 7,Rewrite,Iis7 windows 2008服务器 Iis重写模式 .net 4 非常简单的问题,我正在使用“重写”模式,并发现它相当不错,但我需要帮助设置一个规则,我似乎无法正确设置规则 标准: 对dance music文件夹的任何请求都必须从末尾删除index.aspx,使其结尾类似: 不是 但也必须致力于: 需要重写为: 我已经兜了一圈又一圈了,希望能得到一些帮助 谢谢。将此添加到/defaultDocument部分下面的web.config文件中: <rewrite>

Iis7 windows 2008服务器 Iis重写模式 .net 4

非常简单的问题,我正在使用“重写”模式,并发现它相当不错,但我需要帮助设置一个规则,我似乎无法正确设置规则

标准: 对dance music文件夹的任何请求都必须从末尾删除index.aspx,使其结尾类似:

不是

但也必须致力于:

需要重写为:

我已经兜了一圈又一圈了,希望能得到一些帮助


谢谢。

将此添加到/defaultDocument部分下面的web.config文件中:

<rewrite>
    <rules>
      <rule name="Imported Rule 1" stopProcessing="true">
      <match url=".*" ignoreCase="false" />
      <conditions>
        <add input="{URL}" pattern="^/(media|skin|js)/" ignoreCase="false" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
      </conditions>
      <action type="Rewrite" url="index.aspx" />
      </rule>
    </rules>
</rewrite>