Hi I'm trying to set ProxyPass to pass requested URL as GET parameter to destination URL, but I can't figure out how to write it in the config file.
I tried something like this:
ProxyPass ^(.*)$ http://example.com/?url=$1
ProxyPassReverse ^(.*)$ http://example.com/?url=$1
but it doesn't work. Can you help me please? Thanks!
ProxyPassMatch
, you do understand that^(.*)$
matches only the part of the URL that follows the "domain"? For example, if the URL for the request ishttp://proxy.com/foo/bar/file.ext
the match (i.e., the $1) will befoo/bar/file.ext
, without thehttp://proxy.com/
. Also, any query string followingfile.ext
will be automatically appended after the$1
, but as noted in answer below you cannot in aProxyMatch
specify a query string as part of the target url