How to remove last character in request url using apache?

▼魔方 西西 提交于 2019-12-11 04:53:33

问题


I need to remove last character(#) in request url using apache. Example www.example.com/test/test?data=value1,value2,value3#

how to remove # value in the url. (OR) Make apache to allow #.

Now i am getting 400 response in apache.


回答1:


# 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.



来源:https://stackoverflow.com/questions/54022949/how-to-remove-last-character-in-request-url-using-apache

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!