title: PHP https url forwarding
body: <p>Ok so I need my site to automatticly forward all requests to the server for http to https. I was using php with no real problems but now godaddy is telling me that I need to change the way i am doing this. Is my code correct, should i change how im doing this, what method is better? Thanks in advance for the help!</p>
  
  <pre><code>&lt;?php
  if ($_SERVER['SERVER_PORT']!=443)
  {
  $url = "https://". $_SERVER['SERVER_NAME'] . ":443".$_SERVER['REQUEST_URI'];
  header("Location: $url");
  }
  ?&gt;
  </code></pre>