Apache RewriteRule and slashes (%2F)

Solution 1:

Apache directive helped me

AllowEncodedSlashes On  

Solution 2:

I found the answer here here. To quote the relevant bits:

The naked "%2f" is allowed in a query string. but not in a URL. In order to be valid, it would have to be encoded as %252f, which I think you will find to work as you expect.

Because the URL is itself invalid, the server is rejecting it before any apache modules are invoked.

For more information, see RFC2396 - Uniform Resource Identifiers (URI): Generic Syntax.