Sea*_*ley 4 asp.net webforms url-rewriting
我在web.config中按照我的意愿进行了以下URL重写设置.
<rule name="Product Rewrite" stopProcessing="true">
<match url="^products/([^$]+)/([^$]+)" />
<action type="Rewrite" url="products?durl={R:1}&purl={R:2}" />
</rule>
Run Code Online (Sandbox Code Playgroud)
现在我需要排除任何包含/以/ action/edit结尾的URL,即产品/动作/编辑
我知道我需要一个条件块,但我不知道该写什么.
任何帮助将不胜感激.
添加如下条件,否定true确保它匹配除动作/编辑之外的所有内容
<conditions>
<add input="{URL}" negate="true" pattern="action/edit" />
</conditions>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3332 次 |
| 最近记录: |