允许编码斜杠问题
我目前在 Apache 服务器上遇到编码斜杠问题。 url 结构如下:
www.site.com/url/http%3A%2F%2Fwww.anotherurl.com/format/xml
然后我从 Apache 收到 404 错误(我的应用程序应该处理所有错误。)
显然 AllowEncodedSlashes On
指令应该在这个地方帮助我,但它似乎没有产生任何影响。我已将其放入 httpd.conf 中,如下所示:
<VirtualHost *:80>
DocumentRoot /var/www/vhosts/site.com/httpdocs
ServerName site.com
AllowEncodedSlashes On
</VirtualHost>
然后使用 /etc/init.d/httpd restart
命令重新启动 Apache。
几天来我一直在努力解决这个问题。有人说AllowEncodedSlashes 指令有效,有人说它有问题,应该被弃用。我想知道AllowEncodedSlashes 和clean URL 一起工作是否存在问题?
无论如何,感谢所有帮助。提前致谢。
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 AllowEncodedSlashes 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
似乎是 Apache 的一个错误: https://issues.apache.org/bugzilla /show_bug.cgi?id=35256
Seems to be a bug with Apache: https://issues.apache.org/bugzilla/show_bug.cgi?id=35256
您可以使用编码和解码 URL 来解决此类问题。
You can use encode and decode URL for this type problem.