Apache,LocationMatch:匹配查询字符串 [英] Apache, LocationMatch: match query string
本文介绍了Apache,LocationMatch:匹配查询字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用 LocationMatch
和apache匹配查询字符串?
How can I match a query string using LocationMatch
with apache?
<LocationMatch "/index.php\?a=b.*">
// ...
...不幸的是,无法正常工作.
... won't work unfortunately.
推荐答案
好像您不能在 Location
/ LocationMatch
中包含查询字符串.
Looks like you can't include query strings in Location
/LocationMatch
.
来自 Apache文档:
对于所有原始(非代理)请求,要匹配的URL是/path/形式的URL路径.不包括方案,主机名,端口或查询字符串.对于代理请求,要匹配的URL格式为scheme://servername/path,并且必须包含前缀.
For all origin (non-proxy) requests, the URL to be matched is a URL-path of the form /path/. No scheme, hostname, port, or query string may be included. For proxy requests, the URL to be matched is of the form scheme://servername/path, and you must include the prefix.
这篇关于Apache,LocationMatch:匹配查询字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文