首先,我的英語不太好,那是因爲我找不到我發現的東西。IIS + PHP - Url Rewrite Issue
好吧,這裏是我的web.config規則
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1">
<match url="^Girisyap$" ignoreCase="true" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="giris.php" />
</rule>
<rule name="Imported Rule 2" stopProcessing="true">>
<match url="^([0-9a-zA-Z-_/]+)$" />
<action type="Rewrite" url="Sayfalar.php?Sayfa={R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
<directoryBrowse enabled="false" />
</system.webServer>
</configuration>
有了這個規則,當我試圖訪問的http://本地主機:84/Girisyap它顯示giris.php爲好。
如果我訪問http:// localhost:84 /約告訴我Sayfalar.php?Sayfa =繞到也。
但是,當我訪問http:// localhost:84/它給我403.14 - 禁止的錯誤。因爲我沒有使用index.php或default.php,我不想要它。
如何才能告訴'?Sayfalar.php Sayfa ='(Sayfa爲空)訪問到的http://本地主機:84/以及
我沒有網站目錄問題。我只是試圖沒有得到403錯誤。相反,我想顯示'Sayfalar.php?Sayfa ='。有什麼辦法可以在web.config文件中做到這一點。 – traBolics 2014-09-26 02:12:20
這是目錄列表問題。它被某種東西否定,或者被確認。如果你正在尋找一個在web.config文件中的錯誤嘗試添加代碼 <添加值= 「的Login.aspx」/> defaultDocument> –
2014-09-26 02:20:07