title: Conditional ProxyPass Apache
body: <p>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.</p>
  
  <p>However ProxyPass is not allowed within the if directive.</p>
  
  <p>I was trying this:</p>
  
  <pre><code>VirtualHost &lt;*:443&gt;
  ServerName "${APACHE_HOSTNAME}"
  &lt;If "%{QUERY_STRING} =~ /some_string/"&gt;
  RequestHeader set "some_string" "some_string"
  Header set "some_string" "some_string"
  ProxyPass / https://&lt;domain&gt;/
  ProxyPassReverse /  https://&lt;domain&gt;/
  &lt;/If&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>Is there any other way arround of this ? Some Virtualhost logic or using re-writes ?</p>
  
  <p>Thanks !</p>