如果URL中包含问号,则IIS 7 URL重写不起作用 [英] IIS 7 URL Rewrite doesn't work if the url has a question mark in it

查看:383
本文介绍了如果URL中包含问号,则IIS 7 URL重写不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用IIS7的URL重写功能

I'm using the URL rewrite feature of IIS7

我正在尝试重定向这样的网址

I'm trying redirect a URL like this

example.com/?parameter=abc 

到a像这样的网址

example.com/somedirectory

如果源网址中不包含问号,则网址重定向效果很好。

the URL redirect works well if the source URL doesn't contain a question mark in it.

pls help

-Vivek

推荐答案

IIS7重定向不会默认匹配查询字符串模式,所以你必须添加条件以及模式与 {QUERY_STRING} 匹配模式参数= abc

IIS7 redirects don't by default match query strings in the pattern so you have to add a condition as well as the pattern with {QUERY_STRING} matches the pattern parameter=abc

这篇关于如果URL中包含问号,则IIS 7 URL重写不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆