Apache,位置匹配 : match query string

标签 apache query-string locationmatch

如何使用 LocationMatch 匹配查询字符串与 Apache ?

<LocationMatch "/index.php\?a=b.*">
// ...

......不幸的是不会工作。

最佳答案

看起来您不能在 Location 中包含查询字符串/LocationMatch .

来自 Apache Docs :

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,位置匹配 : match query string,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2019594/

相关文章:

javascript - 在没有 session 的情况下将异常消息传递到错误页面 ASP.NET 的最佳实践

regex - Apache LocationMatch 正则表达式

Apache 2.2.25 LocationMatch 正则表达式失败

regex - Apache 位置匹配通配符 URL

python - Errno 13 权限被拒绝的 bash 脚本和 apache2

query-string - asp .net 2.0 上的最大查询字符串长度

svn - 我如何在 Windows 上编译 mod_dontdothat

php - Angular 查询参数,如 httpd_query_params

php - 当您发布大的原始数据时,PHP 是否正在写入磁盘?

java - 无法连接到 SFTP 服务器 Apache 常见