AllowEncodedSlashes Issue
I am currently having issues with encoded slashes on my Apache server. The url structure is as follows:
www.site.com/url/http%3A%2F%2Fwww.anotherurl.com/format/xml
I am then getting a 404 error from Apache (my application should handle all errors.)
Apparently the AllowEncodedSlashes On
directive should help me in this spot, but it doesn't seem to be making any impact whatsoever. I've placed it in the httpd.conf like so:
<VirtualHost *:80>
DocumentRoot /var/www/vhosts/site.com/httpdocs
ServerName site.com
AllowEncodedSlashes On
</VirtualHost>
Then restarted Apache with the /etc/init.d/httpd restart
command.
I've been trying to solve this issue for days now. I've some people saying that the AllowEnc开发者_开发技巧odedSlashes directive works, and some people saying that it's buggy and should be depreciated. I'm wondering if there's an issue with AllowEncodedSlashes and clean URL's working together?
Anyway, all help is appreciated. Thanks in advance.
Seems to be a bug with Apache: https://issues.apache.org/bugzilla/show_bug.cgi?id=35256
You can use encode and decode URL for this type problem.
var uri = "https://w3schools.com/http%3A%2F%2Fwww.anotherurl.com/format/xml";
var uri_enc = encodeURIComponent(uri);
var uri_dec = decodeURIComponent(uri_enc);
After encode-
Encoded URI: https%3A%2F%2Fw3schools.com%2Fhttp%253A%252F%252Fwww.anotherurl.com%2Fformat%2Fxml
After Decode-
Decoded URI: https://w3schools.com/http%3A%2F%2Fwww.anotherurl.com/format/xml
精彩评论