title: hiding port number through .htaccess node.js express
body: <p>I am running two node servers on my website. 1 is a socket.io server for live streaming data on the main site and the other is streaming JSON data to a sub-domain api.site.com.</p>
  
  <p>my main node is running on port 8001 and the second is running on 8080. I have been able to hide the port number for the first one in .htaccess using </p>
  
  <pre><code>RewriteCond %{SERVER_PORT} 8001
  </code></pre>
  
  <p>but am struggling to hide the <code>8080</code> port.</p>
  
  <p>If I add in <code>RewriteCond %{SERVER_PORT} 8080</code> and go to my api location <code>api.site.com/prices/all</code> I get 404 not found error and if I go to <code>api.site.com:8080/prices/all</code> everything still works.</p>
  
  <p>How can I hide the port so <code>api.site.com/prices/all</code> works?</p>
  
  <p>This is also slightly linked to my other question: <a href="https://stackoverflow.com/questions/36960291/node-js-express-handling-other-get-tries">here</a> where I want to deny other .get attempts so <code>api.site.com/price</code> wont work.</p>