My apache server is visited with \ (backslashes) in URLs such as
http://myhost.org/this\is\a\hacker\attempt.html
According to RFC 2396, section 2.4.3 the \ character in URLs are not allowed (%5C should be used instead) . For that reason I would like to configure apache to respond 400 Bad Request every time such character is in the request URL.
How can I configure apache to do that? Can I use mod_rewrite for that?
There is a more general question over at serverfault which contains the answer for this question: https://serverfault.com/questions/451521/how-can-i-configure-apache-to-respond-400-when-request-contains-an-invalid-byte