【发布时间】:2018-05-12 01:15:41
【问题描述】:
我需要对 url(www.example.org/download.php) 使用重写规则来访问另一个名为 download.php 的文件,该文件不在我的根目录中,但位于 C:/repo/other_directory /test/download.php,但是,它不起作用。我必须在规则中使用绝对路径。对此的任何帮助将不胜感激。我的代码如下:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule placestoswim" stopProcessing="true">
<match url="download.php" ignoreCase="false" />
<action type="Rewrite" url="C:/repo/other_directory/test/download.php" appendQueryString="false" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
【问题讨论】:
标签: url-rewriting web-config windows-server-2016