htaccess redirect from one port to another
<p>I have want to redirect urls that contains ?_escaped_fragment_= to another port. For an example,</p>

<pre><code>http://localhost:8080/web/?_escaped_fragment_=/privacy
</code></pre>

<p>to</p>

<pre><code>http://localhost:8082/web/?_escaped_fragment_=/privacy
</code></pre>

<p>My current htaccess is as below.</p>

<pre><code>RewriteEngine On
RewriteCond %{REQUEST_URI}  ^/$
RewriteCond %{QUERY_STRING} ^_escaped_fragment_=/?(.*)$
RewriteRule ^(.*)$ http://dev.dermveda.com:8082/$1 [r=301,nc]
</code></pre>

<p>The issue is, if the URL contains <code>web/</code>, it doesnt redirect to my new port. But if it doesnt have <code>web/</code> it redirects fine.
e.g. 
URLs like <code>http://localhost:8080/web/?_escaped_fragment_=/privacy</code>are not redirected. But URLs like <code>http://localhost:8080/?_escaped_fragment_=/privacy</code> are redirected. My question is, How should I implement htaccess to redirect URLs with <code>web/</code> to another port.</p>