I am have the following line in my httpd.co开发者_运维问答nf 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
From the documentation for ProxyPass:
url is a partial URL for the remote server and cannot include a query string.
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:
ProxyPass /something http://localhost:9080/proxy
RewriteEngine on
RewriteRule ^/proxy /StubEndpoint?stub=stub
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:
<Location /something>
RewriteEngine On
RewriteRule ^ http://localhost:9080/servlet/StubEndpoint?stub=stub [P]
</Location>
精彩评论