title: RewriteRule for special case
body: <p>I have a requirement for proxying  a request at apache in case requeset is coming for /anotherserver and has query parameter like name.</p>
  
  <p>So incoming URL would be...</p>
  
  <p>mywebsite.com is running on apache.
   <a href="http://mywebsite.com/anotherserver/admin/mypage.aspx?name=" rel="nofollow">http://mywebsite.com/anotherserver/admin/mypage.aspx?name=</a>&lt;></p>
  
  <p>It should be proxied to which it is running a portal at IIS server.
  http://&lt;>-mywebsite.com/admin/mypage.aspx</p>
  
  <p>I am writing my rules as</p>
  
  <pre><code>RewriteCond %{REQUEST_URI}    ^/anotherserver.* [NC]
  RewriteCond %{QUERY_STRING} ^name=([^&amp;]+)
  RewriteRule ^anotherserver/(.*)$  http://%1-mywebsite.com/$1 [NC,P,L]
  </code></pre>
  
  <p>This rule is not running, fine. Is anything wrong with this rule? How can I make it work. I want this as Proxy rule only.</p>