【发布时间】:2015-03-25 08:45:56
【问题描述】:
您好,我正在尝试将我的网址:www.mydomain.com/hw/Index.aspx 重写为 www.mydomain.com/hello-world/index.aspx。这是我在 web.config 中的代码:
<rule name="Redirect to WWW" stopProcessing="true">
<match url="^hello-world/index.aspx" />
<action type="rewrite" url="hw/Index.aspx" />
</rule>
这个问题是我有两个 URL 和同一个页面。
- www.mydomain.com/hw/Index.aspx
- www.mydomain.com/hello-world/index.aspx
我想做的是当用户浏览 www.mydomain.com/hw/Index.aspx 它将被标记为 301 并将重定向到 www.mydomain.com/hello-world/index.aspx
请帮帮我。
提前致谢。
【问题讨论】: