title: Front-end development with conditional HTTP and HTTPs routes
body: <p>I am currently using MEAN stack for web development. My questions is how do I mix/redirect HTTP and HTTPs pages on the same website? </p>
  
  <p>For most scenarios I am communicating with the back-end using HTTP protocol.  And for some pages I <strong>absolutely</strong> need to use HTTP (For example <strong><em>/shop</em></strong> route I used a <strong>iframe</strong> that displays info from other websites. Also for some pages I need to HTTP GET from other API services providers.).  It seems that I cannot achieve these with HTTPs setup.</p>
  
  <p>For some cases I am communicating with the back-end using HTTPs (such as <strong><em>/money</em></strong> route) ...etc. And apparently you need HTTPs with money involved. </p>
  
  <p>My back-end has middlewares setup so that if you request <strong><em>/money</em></strong> using HTTP it will return some error (currently returning 301 moved permanently..)  </p>
  
  <p>But I am not sure how do I proceed with front-end development. For Angular part should I just do some configurations so when the route consists of /money I just reload the whole page in HTTPs and should I just explicitly make sure the links look someting like this? </p>
  
  <pre><code>&lt;a ng-href="https://www.domain.com/#!/money"&gt;money page&lt;/a&gt;
  </code></pre>
  
  <p>But that seems like a lot of hard-coding for me. </p>
  
  <p>My question is: 
  1. Am I thinking in the right direction?<br>
  2. Is it doable? </p>
  
  <p>Thanks and any idea is greatly appreciated! </p>