title: Change port and host using .htaccess
body: <p>I am trying to use <code>mod_rewrite</code> to basically port forward a port on a subdomain to another port on another IP.</p>
  
  <p>Like this:</p>
  
  <pre><code>sub.website.com:2000 --&gt; 123.45.67.891:3000 
  </code></pre>
  
  <p>How could this be accomplished using a <code>.htaccess</code> file with  <code>mod_rewrite</code>?</p>
  
  <p>I have tried the following but to no avail:</p>
  
  <pre><code>RewriteCond %{HTTP_HOST} ^sub.website.com$ [NC]
  RewriteCond %{SERVER_PORT} ^2000$
  RewriteRule ^(.*)$ https://123.45.67.891:3000/$1 [L,R=302]
  </code></pre>