【发布时间】:2014-09-26 10:20:58
【问题描述】:
首先我的英语不太好,那是因为我找不到我找到的东西。
好的,这是我的 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:// localhost:84/Girisyap 时,它也会显示 giris.php。
如果我访问 http:// localhost :84/Around 向我展示了 Sayfalar.php?Sayfa=Around 以及。
但是当我访问 http://localhost:84/ 时,它给了我 403.14 - 禁止错误.因为我没有使用 index.php 或 default.php,我不想要它。
如何显示 'Sayfalar.php?Sayfa=' (Sayfa 为空) 访问 http://localhost:84/ 为好
【问题讨论】:
标签: php iis url-rewriting