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

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

问题描述

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

I'm using the URL rewrite feature of IIS7

我正在尝试重定向这样的 URL

I'm trying redirect a URL like this

example.com/?parameter=abc 

到这样的网址

example.com/somedirectory

如果源 URL 中不包含问号,则 URL 重定向效果很好.

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

请帮忙

-维维克

推荐答案

IIS7 重定向在默认情况下不匹配模式中的查询字符串,因此您必须使用 {QUERY_STRING}<添加条件和模式/code> 匹配模式 parameter=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天全站免登陆