我想重定向重定向規則使用的web.config
http://www.mydomain.com/rakhi-blog/index.php/2012/06/20/my-article/到 http://www.mydomain.com/rakhi-blog/2012/06/20/my-article/
爲此,我使用下面的代碼:
<configuration>
<system.webServer>
<defaultDocument>
<files>
<remove value="index.php" />
<add value="index.php" />
</files>
</defaultDocument>
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url="(.*)" ignoreCase="true" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:0}" />
</rule>
<rule name="Rewrite Index">
<match url="^index.php/*" />
<action type="Redirect" url="/rakhi-blog/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
但是這個代碼不工作。任何人都可以幫我。
我得到一個HTTP錯誤500.19當我實現了 – serlingpa