【问题标题】:IIS URL 301 redirect url with query string to extentionlessIIS URL 301 将带有查询字符串的 url 重定向到无扩展
【发布时间】:2015-07-16 16:44:54
【问题描述】:

我想301重定向这个网址:

Index.asp?SourceID=20&CategoryID=20&ArticleID=1

到:
联系方式

在 IIS -> URL REWRITE 我已经设置好了:

**Match URL**
Requested URL:  Matches the Pattern
Using: Exact Match
Pattern: Index.asp?SourceID=20&CategoryID=20&ArticleID=1

动作

Action type: Redirect
Redirect URL: http://www.mydomian.com/Contact
Append query string: TRUE
Redirect type: Permanent (301)

当我测试它时,我得到一个 404。

我该如何设置?

【问题讨论】:

    标签: asp.net redirect iis url-rewrite-module


    【解决方案1】:

    您可能想查看 URL Rewrite,这里有一篇博客文章,其中有类似的内容,您可以使用 Rewrite Map 在 web.config 中声明这些内容:

    http://blogs.msdn.com/b/carlosag/archive/2008/09/02/iis7urlrewriteseo.aspx

    【讨论】:

    • 由于我对这方面的知识不是很了解,所以云任何人都可以在这里写一个“如何”吗?如何将 (301) 这个:Index.asp?SourceID=20&CategoryID=20&ArticleID=1 重定向到:联系人?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-10-28
    • 1970-01-01
    • 2012-04-25
    相关资源
    最近更新 更多