【发布时间】:2016-02-17 00:27:13
【问题描述】:
我有一个将所有请求重定向到 index.php 的站点。不过,我需要对我的 web.config 稍作改动。
这是它目前在重定向部分中的内容:
<rewrite>
<rules>
<rule name="Process" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
但是,我需要它,以便如果有人访问 /news,那么它将转到 news.php 而不是 index.php。
我将使用什么规则以及将其放置在哪里?我来自 Apache 背景,但我的客户端使用的是 IIS。
【问题讨论】:
标签: asp.net iis web-config