I'm trying to achieve a conditional proxypass directive, so when a certain query string is being called to the virtualhost it proxies it somewhere else and adds Header.
However ProxyPass is not allowed within the if directive.
I was trying this:
VirtualHost <*:443>
ServerName "${APACHE_HOSTNAME}"
<If "%{QUERY_STRING} =~ /some_string/">
RequestHeader set "some_string" "some_string"
Header set "some_string" "some_string"
ProxyPass / https://<domain>/
ProxyPassReverse / https://<domain>/
</If>
</VirtualHost>
Is there any other way arround of this ? Some Virtualhost logic or using re-writes ?
Thanks !
ok this worked for me: