title: htaccess port forwarding URLs
body: <p>I am looking to setup 2 .htaccess re-writes, but am not sure what they would actually look like:</p>
  
  <pre><code>http://www.mysite.com -&gt; http://www.myothersite.com:880
  </code></pre>
  
  <p>and</p>
  
  <pre><code>https://www.mysite.com -&gt; https://www.myothersite.com:4443
  </code></pre>
  
  <p>Just to deal with port-forwarding issues...</p>
  
  <p>Here is what I am currently trying:</p>
  
  <pre><code>RewriteEngine on
  RewriteBase /
  
  RewriteCond %{HTTP_HOST} ^cloud\.mysite\.com$ [NC]
  RewriteCond %{HTTPS} off
  RewriteRule ^ http://mysite.no-ip.org:880%{REQUEST_URI} [R=301,L]
  
  RewriteCond %{HTTP_HOST} ^cloud\.mysite\.com$ [NC]
  RewriteCond %{HTTPS} on
  RewriteRule ^ https://mysite.no-ip.org:4443%{REQUEST_URI} [R=301,L]
  
  RewriteCond %{HTTP_HOST} ^mysite\.com$ [OR]
  RewriteCond %{HTTP_HOST} ^www\.mysite\.com$
  RewriteRule ^/?$ "http\:\/\/www\.mysite\.com\/joomla" [R=301,L]
  </code></pre>