Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

problem in apache httpd.conf with question mark character

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

like image 609
cateof Avatar asked Jun 17 '26 16:06

cateof


1 Answers

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.

like image 50
patrickmdnet Avatar answered Jun 20 '26 07:06

patrickmdnet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!