首先,我的英语不太好,那是因为我找不到我发现的东西。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