【发布时间】:2019-10-26 16:44:09
【问题描述】:
我试图为 PHP 页面的“永久重定向”构建一个重写规则到 MVC 站点。这是PHP站点的URL /Home/new-age-xxx.php & 我希望用户重定向到的 MVC 站点的 url "/home/new-age-xxx"
这是我的 URL 重写规则
<rule name="Imported Rule 1-599" stopProcessing="true">
<match url="^home\new/-age/-xxx\.php$" ignoreCase="false" />
<action type="Redirect" url="/home/new-age-xxx" appendQueryString="false" redirectType="Permanent" />
</rule>
它没有重定向到 /home/new-age-xxx,即使我试图将它移动到其他 url,例如 /login/index
有什么建议吗?
谢谢
【问题讨论】:
-
了解如何编写正确的正则表达式以及如何排除故障,docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/…
标签: asp.net-mvc iis url-rewriting