Reputation: 139
Why this page returns the default 404 page: http://example.com/this%2Fthis
but this one returns the custom one: http://example.com/this/this
and this one returns the custom one also: http://example.com/?i=this%2Fthis
Here is my htaccess file:
ErrorDocument 404 http://example.com/?id=error
In my htaccess, I clearly specify the page all errors should redirect to. In the 1st case, I am getting the default error page and not my custom one.
The question is, what I must add to my htaccess file in order to have the url work properly and redirect to the custom error page?
Upvotes: 3
Views: 473
Reputation: 785136
This behavior is due to a security reason.
URLs containing %2f
OR %5c
characters just return a default 404
from Apache
for security reasons.
Upvotes: 1