apache httpd.conf 中带有问号字符的问题
中有以下行
我的 httpd.conf 文件ProxyPass /something http://localhost:9080/ servlet/StubEndpoint?stub=stub
系统响应
请求的资源 (/servlet/StubEndpoint%3Fstub=stub/) 不可用,即它替代?与%3F。我该如何解决这个问题?该问号似乎被“%3F”取代,我返回 404
I am have the following line in my httpd.conf file
ProxyPass /something http://localhost:9080/servlet/StubEndpoint?stub=stub
the system respondes with
The requested resource (/servlet/StubEndpoint%3Fstub=stub/) is not available, ie it substitutes ? with %3F. How can I resolve that problem? That question mark seems to be substituted by "%3F" and I am getting back 404
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从 ProxyPass 的文档中:
在您的示例中,
Stub=stub
是查询字符串。 %3F 替换是作为URL 编码的一部分完成的。您也许能够代理到一个 URL,然后将其重定向到最终目的地(使用查询字符串),类似于:
这应该会导致任何以 /something 开头的 URL 返回到 StubEndpoint?stub=stub 的重定向。不过我自己还没有测试过。
From the documentation for ProxyPass:
In your example,
stub=stub
is the query string. The %3F replacement is done as part of URL encoding.You may be able to proxy to a URL which is then redirected to the ultimate destination (with a querystring), something like:
This should cause any URLs starting with /something to return a redirect to StubEndpoint?stub=stub. However I have not tested this myself.
我喜欢按位置分组。我的工作解决方案是:
I like grouping in Location. My working solution is: