问题描述
我的服务器是 Linux 服务器,经销商是我的.所以我也可以到达 WHM 面板.
My server is Linux server and reseller is mine. So i can reach WHM panel, too .
当 GET 数据出现时:
When GET data comes like :
a.php?url=http://www.domain.com
返回 403 Forbidden.
return 403 Forbidden.
但是如果数据是这样的:
But if data comes like this :
a.php?url=www.domain.com
它正在工作.
因此,http:// 生成错误.我该如何解决?
So, http:// generating an error. How can i fix it ?
此外,这将返回 403 Forbidden :
Also, this is returning 403 Forbidden :
a.php?url=http%3a%2f%2fwww.domain.com
谢谢.
推荐答案
这绝对是mod_security 核心规则.我在以前的主机上遇到了同样的问题.不过我不记得规则名称了.
This is definitely one of the mod_security CoreRules. I've had the very same issue on my previous host. I don't remember the rule name however.
您应该调查核心规则版本.2.1.1 将是最新的,并且可能已经放宽了那个特殊的过滤器.如果更新或重新配置没有帮助,您将不得不 base64_encode() 您的 url 参数(更简单的编码由 mod_security 嗅探).
You should investigate the core rules version. 2.1.1 would be current, and might have relaxed that peculiar filter. If updating or reconfiguring doesn't help you would else have to base64_encode() your url parameter (simpler encodings are sniffed by mod_security).
SecFilterDebugLog /var/log/apache2/modsec_log
SecFilterDebugLevel 4
启用 mod_security 的调试日志记录,因此您可以找出实际导致问题的规则 - 如果您想禁用它(建议).http://www.modsecurity.org/documentation/modsecurity-apache/1.9.3/modsecurity-manual.html#07-logging
Enables the debug logging of mod_security, so you can find out which rule actually caused the issue - if you want to disable it (advisable).http://www.modsecurity.org/documentation/modsecurity-apache/1.9.3/modsecurity-manual.html#07-logging
这篇关于403 发送 GET 数据时出现禁止错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!