因此,如果我输入一个URL:http://sample.com/maindir/test123,我的Rewrite工作正常.如果我输入的网址如下:http://sample.com/maindir/test123/test234它会中断,给出500错误.如果我将其更改为重定向而不是重写规则,则这两个都有效
<rule name="Test" stopProcessing="true">
<match url="^maindir\/?(?:([^\/]+))?\/?(?:([^\/]+))?\/?(?:([^\/]+))?\/?(?:([^\/]+))?\/?" />
<action type="Rewrite" url="maindir/?a1[]={R:1}&a1[]={R:2}&a1[]={R:3}&a1[]={R:4}" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
</rule>
Run Code Online (Sandbox Code Playgroud)
在对此非常沮丧之后,试图找到解决方案,我想我会看到是否有其他人可以看到这里发生了什么.先感谢您.
| 归档时间: |
|
| 查看次数: |
173 次 |
| 最近记录: |