title: How to force a webpage to use HTTPs?
body: <p>I have designed a Online shopping website. Everything works fine with http. Now I want that the profile and the payment gateway should use HTTPS instead of HTTP. I have not dealt with https before and so I am stuck here. Here is my code snippet. I want profile.php to use https. I have seen some post where it has been told to edit mod_rewrite or use some https redirect function. But how will I do that? I am using XAMPP.</p>
  
  <pre><code>    if($rws['user_email']==$UserName &amp;&amp; $rws['user_pass']==$UserPwd){
          if($_REQUEST['remember']==1){
              setcookie('uname',$UserName,time()+24*60*60);
              setcookie('pwd',$UserPwd,time()+24*60*60);
          }
  
          $_SESSION['fname'] = $rws['user_fname'];
          $_SESSION['ud'] = $rws['user_id'];
  
  
  
          header('Location:profile.php');
         }
  </code></pre>