如何使用Apache删除请求URL中的最后一个字符? [英] How to remove last character in request url using apache?

查看:60
本文介绍了如何使用Apache删除请求URL中的最后一个字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆