title: Apache Reverse Proxy to URL With Parameters
body: <p>I am trying to setup a reverse proxy with 2 CentOS 6.5 machines running Apache 2.2.15, where the <strong>private</strong> URL contains parameters (static, same for all requests coming through the public url), so the setup should work like this:</p>
  
  <p><strong>User --> public.url/ --> private.url/?parameter=value</strong></p>
  
  <p><strong>User --> public.url/anything --> private.url/anything?parameter=value</strong></p>
  
  <p>I have managed to setup the reverse proxy using the following directives in /etc/httpd/conf.d/reverse-proxy.conf</p>
  
  <pre><code>    ProxyRequests Off
  
      proxyPass / private.url:80/ connectiontimeout=5 timeout=30
      proxyPassReverse / private.url:80/
  
      ProxyPassReverseCookieDomain private.url public.url
  
      &lt;Location /&gt;
  
              RequestHeader unset Accept-Encoding
              AddOutputFilterByType SUBSTITUTE text/html
              Substitute "s|private.url|public.url|i"
  
      &lt;/Location&gt;
  </code></pre>
  
  <p>and everything works as expected:</p>
  
  <p><strong>User --> public.url/ --> private.url/</strong></p>
  
  <p><strong>User --> public.url/anything --> private.url/anything</strong></p>
  
  <p>however I am not sure how to accomplish the addition of the <strong>?parameter=value</strong> suffix to the private.url</p>
  
  <p>Any fingers pointing in the right direction will be much appreciated!</p>