我使用SQL LocalDb在IIS8.0上的计算机上本地托管了一个Orchard站点。我还在IIS中安装并集成了URL重写模块。我已经修改了Orchard.Web项目中的web.config,以便重定向为
<rewrite>
<rules>
<rule name="Redirect services to expertise" stopProcessing="true">
<match url="/services/(.*)" />
<action type="Redirect" url="/expertise/{R:1}" />
</rule>
</rules>
</rewrite>所以,我打算做的是从"http://localhost:70/Orchard/services/content-management" to "http://localhost:70/Orchard/expertise/content-management".重定向,但这并不像预期的那样工作,并且没有重定向。它打开了同样的老"../services/..“URL。
有什么想法吗?
提前谢谢。
发布于 2013-06-27 06:51:00
我相信问题出在你的统治上。url没有前导斜杠。尝试将规则更改为:
<rule name="Redirect services to expertise" stopProcessing="true">
<match url="^services/(.*)" />
<action type="Redirect" url="expertise/{R:1}" />
</rule>这将重定向所有以services/开头的url ...为了专业知识/..。
https://stackoverflow.com/questions/17319008
复制相似问题