轉換
mod_rewrite rules
到
IIS URL rewrite rules
我非常感謝你指着我回來在url重寫模塊的方向。我已經嘗試使用,但並不知道它有導入功能!在我導入了.htaccess文件後,它仍然無法正常工作(正如我們所期望的那樣,導入大聲笑),但是在我調整好reqex後,所有的工作都正常了!再次感謝你幫助我。對於任何需要爲此設置正確web.config的人,它都是:)
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="Pattern" pattern="(.*php|.*htm|.*html)$" ignoreCase="true" negate="false" />
</conditions>
<action type="Rewrite" url="index.php?q={R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>