1

在 URL 中使用(反斜杠)访问我的 apache 服务器\,例如

http://myhost.org/this\is\a\hacker\attempt.html

根据RFC 2396,第 2.4.3 节\,不允许使用 URL 中的字符(%5C应改为使用)。出于这个原因,我想将 apache 配置为每次在请求 URL 中出现此类字符时响应 400 Bad Request。

我如何配置 apache 来做到这一点?我可以使用 mod_rewrite 吗?

4

1 回答 1

0

serverfault 上有一个更一般的问题,其中包含此问题的答案:https ://serverfault.com/questions/451521/how-can-i-configure-apache-to-respond-400-when-request-contains -一个无效字节

于 2012-11-25T08:58:06.877 回答