【发布时间】:2017-12-20 14:10:39
【问题描述】:
我正在尝试使用 IIS URL 重定向将 wordpress 帖子重定向到 Coldfusion 页面。帖子链接是
domain.com/?p=345
所以我使用滚动模式设置了以下重定向
/?p=([0-9]+)
指向下一页...
/blog.cfm?ID={R:1}
但遗憾的是,当我查看该页面时,它只是刷新,并没有重定向到 blog.cfm 页面。
非常感谢任何帮助或建议。
下面是完整的 web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="wp post redirect" stopProcessing="true">
<match url="/?p=([0-9]+)" />
<action type="Redirect" url="blog.cfm?ID={R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
【问题讨论】:
-
能否在您的问题中添加来自 web.config 的重定向规则
-
嗨,我现在已经添加了 web.config。谢谢
标签: wordpress iis url-rewriting coldfusion