title: using proxy instead of redirection with htaccess rewriteRule
body: <p>I'm developing a webapp and for the static files I'm simply using apache at <code>localhost</code> while the backend is on a couchdb instance running at <code>localhost:5984</code>.</p>
  
  <p>The webapp interacts with files from the backend all the time. So what is happening when trying to test on apache all file requests to <code>localhost:5984</code> are getting blocked due the cross-domain policy so the only way to get that working is starting the browser by setting flags to ignore that. </p>
  
  <p>But again I get stuck when trying to test the app on mobile such ipad or iphone.</p>
  
  <p>Currently I have this on my <code>.htaccess</code> file.</p>
  
  <pre><code>RewriteEngine  on
  
  # these are 302 http redirections instead of serving as a proxy
  RewriteRule auth http://localhost:5984/auth [L]
  RewriteRule db/([\s\S]+) http://localhost:5984/db/$1 [L]
  RewriteRule send/([\s\S]+) http://localhost:5984/send/$1 [L]
  
  # these are just redirections to static files and work great
  RewriteRule ^([a-z/.]+) _attachments/$1 [L]
  RewriteRule ^$ _attachments/ [L]
  </code></pre>
  
  <p>As you can see I have really no idea on how to deal with apache configuration unfortunately.
  But what is happening right now is that for some of these rules apache is simply redirecting the page instead of provide it as a proxy server which causes the issue with cross-domain.</p>
  
  <p>Also on the first <code>auth</code> rule I send POST and DELETE requests which as a redirection instead of proxy it won't pass the data being POSTed through.</p>
  
  <p>So what I would like to achieve is to activate some kind of feature (if it exists) which will make apache simply render the page as it was on the localhost domain instead of redirect it. (I named this a a proxy, but perhaps that's not even the right term, sorry for any mistake committed with the nomenclatures).</p>
  
  <p>Is is possible to achieve such action?
  Thanks in advance</p>