asp.net – IIS Web.Config 301重定向查询字符串参数(?)
发布时间:2020-12-16 07:23:49 所属栏目:asp.Net 来源:网络整理
导读:rule name="blog" stopProcessing="true" match url="en/blog.aspx?Id=9" / action type="Redirect" url="http://www.mynewurl.com" redirectType="Permanent" / /rule 我可以重定向“en / blog.aspx”,但我无法仅重定向“en / blog.aspx?Id = 9”. 有任何
<rule name="blog" stopProcessing="true"> <match url="en/blog.aspx?Id=9" /> <action type="Redirect" url="http://www.mynewurl.com" redirectType="Permanent" /> </rule> 我可以重定向“en / blog.aspx”,但我无法仅重定向“en / blog.aspx?Id = 9”. 有任何想法吗? 解决方法
终于找到了解决方案:
/en/blog.aspx?Id=9将重定向到http://www.newurl.com. <rule name="blog" stopProcessing="true"> <match url="en/blog.aspx$" /> <conditions> <add input="{QUERY_STRING}" pattern="Id=9" /> </conditions> <action type="Redirect" url="http://www.newurl.com" redirectType="Permanent" /> </rule> 在这里找到解决方案:301 redirect not working in IIS 7 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
推荐文章
站长推荐
- 如何使用ASP.NET Core创建多部分HTTP响应
- asp.net-mvc – ASP.NET MVC:部分知道它是否是从
- asp.net mvc 设置一个action的访问人数,达到上线
- asp.net – 为什么<%=%>在一种情况下工作,但在
- asp.net – 计算代码后面的代码行数和aspx文件的
- asp.net-mvc – 如何使用ASP.NET MVC中的复选框创
- asp.net-mvc-3 – Asp.net MVC3从razor View访问
- active-directory – IdentityServer3 – 适用于
- ASP.Net使用什么缓存算法?
- 使用System.Net.Mail中的SMTP发送邮件(带附件)
热点阅读