Apache mod_rewrite encounters a 404 error in URL rewriting failure caused by special symbols such as % 2F or % 5C (forward and backward slash ).
. Htaccess File
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}
. htaccess file%{request_filename}-%{request_filename}-^ (. *) $ index.php/$1 [Qsa,pt,L]Http://localhost/Application/Home/Index/index/url/http%3A%2F%2Fwww.domain.com%2Fpage%2FWhen accessing the link above, the 404 is always present, and the rewrite
During the use of the Apache address rewrite mod_rewrite, it was found that when%2f (/) or%5c (\) appeared in the URL and path_info, it would be considered an illegal request and Apache would return directly to the "404 (Not Found)" error.In other
In recent days, when the interface was developed, Tomcat reported 400 errors and looked for the following reasons.Error cause : The parameters section of the URL contains/, the default tomcat is not supported URL parameters include:/(%2F), \
Some symbols cannot be passed directly in the URL, and if you want to pass these special symbols in the URL, they will be encoded. The encoded format is: The ASCII code of the% plus character, which is a percent percent, followed by the ASCII
A recent project found that%2f's relative URL was identified, resulting in 404 errors.
Url:http://w3schools.com/xxx%2fxxx%2ftest.asp?name=stale&car=saab
This behavior occurs because Apache does not recognize the encode URL.
You can add
Special character escaping encoding in URL URLsDecember 29, 2017 09:10:57Hits:Special character escaping encoding in URL URLsCharacter-URL encoded valueSpaces-%20"-%22#-%23%-%25&-%26(-%28)-%29+-%2B,-%2c/-%2F:-%3a; -%3b=-%3d>-%3e? -%3f@-%40\-%5C|
As a front-end, daily dealing with URLs is essential. But maybe every day is just a simple use, it is just smattering, with the work, I found in the daily grab package debugging, interface calls, browser compatibility and many other aspects, do not
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.