我正在尝试将数据库动态创建的当前 URL 重写为搜索引擎友好的 URL
例如http://mysite.co.uk/clubs/?club=AFC%20Wimbledon
将成为http://mysite.co.uk/clubs/afc-wimbledon
我有以下 web.config 似乎什么也没做;
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RedirectUserFriendlyURL1" stopProcessing="true">
<match url="^clubs/?club=([A-z0-9]+)"/>
<conditions>
<add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
</conditions>
<action type="Redirect" url="clubs/{R:1}" appendQueryString="false" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>