【发布时间】:2015-10-08 13:19:15
【问题描述】:
我正在从旧网站重定向到使用友好网址的新网站。
进入的网址是 example.com/news-events/some-news-story.html,它重定向到 anotherdomain.com/news/some-news-story
现在我建立的规则除了从末尾剥离 .html 以重定向到 anotherdomain.com/news/some-news-story.html 之外的所有内容。
这应该很简单,但我画的是空白。
规则如下:
<rules>
<rule name="Redirect news posts" stopProcessing="true">
<match url="^news-events/(.*)$" ignoreCase="false" />
<action type="Redirect" redirectType="Permanent" url="http://www.anotherdomain.com/news/{R:1}" />
</rule>
</rules>
感谢任何帮助/建议。
【问题讨论】:
标签: .net url redirect web-config url-redirection