Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache2 apache httpd.conf中带有问号字符的问题_Apache2_Httpd.conf_Url Encoding - Fatal编程技术网

Apache2 apache httpd.conf中带有问号字符的问题

Apache2 apache httpd.conf中带有问号字符的问题,apache2,httpd.conf,url-encoding,Apache2,Httpd.conf,Url Encoding,我的httpd.conf文件中有以下行 ProxyPass/什么 系统响应为 请求的资源(/servlet/StubEndpoint%3Fstub=stub/)不可用,即它是否替换?使用%3F。我怎样才能解决这个问题?这个问号似乎被“%3F”所取代,我从文档中得到404: 在您的示例中,stub=stub是查询字符串。%3F替换是作为的一部分完成的 您可以代理到URL,然后将其重定向到最终目的地(使用查询字符串),如: ProxyPass /something http://localhost:

我的httpd.conf文件中有以下行

ProxyPass/什么

系统响应为


请求的资源(/servlet/StubEndpoint%3Fstub=stub/)不可用,即它是否替换?使用%3F。我怎样才能解决这个问题?这个问号似乎被“%3F”所取代,我从文档中得到404

在您的示例中,
stub=stub
是查询字符串。%3F替换是作为的一部分完成的

您可以代理到URL,然后将其重定向到最终目的地(使用查询字符串),如:

ProxyPass /something http://localhost:9080/proxy
RewriteEngine on
RewriteRule ^/proxy /StubEndpoint?stub=stub

这将导致任何以/something开头的URL返回到StubEndpoint?stub=stub的重定向。但是我自己没有测试过。

我喜欢在位置上分组。我的工作解决方案是:

<Location /something>
    RewriteEngine On
    RewriteRule ^ http://localhost:9080/servlet/StubEndpoint?stub=stub [P]
</Location>

重新启动发动机
重写规则^http://localhost:9080/servlet/StubEndpoint?stub=stub [P]

如果代理到“”,没有查询字符串,会发生什么?它需要查询字符串。它以“null”消息进行响应。
<Location /something>
    RewriteEngine On
    RewriteRule ^ http://localhost:9080/servlet/StubEndpoint?stub=stub [P]
</Location>