如何使用Apache删除请求URL中的最后一个字符? [英] How to remove last character in request url using apache?
问题描述
我需要使用apache删除请求网址中的最后一个字符(#). 例子 www.example.com/test/test?data=value1,value2,value3#
I need to remove last character(#) in request url using apache. Example www.example.com/test/test?data=value1,value2,value3#
如何删除网址中的#值. (或者) 让Apache允许#.
how to remove # value in the url. (OR) Make apache to allow #.
现在我在Apache中收到400条回复.
Now i am getting 400 response in apache.
推荐答案
#
is reserved character according to rfc3986 section-2.2 and it seems there is no way to make Apache ignore it, it will throw error 400 immediately when it gets the request (even without waiting for headers to arrive).
Your best bet may be to write simple custom reverse proxy that will strip that character before forwarding the request to Apache httpd.
这篇关于如何使用Apache删除请求URL中的最后一个字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!