My Professional Profile

I am Johnson Augustine Sr.Software Engineer and System Architect. I have 10 Yrs of hands on expertise in ASP.net MVC 5 , Angular 5 , C# MVC Razor, WPF MVVM , Android , IOS Swift 3 , IOS11 MSSQL,MySQL Database,,PHP,C/C++/Visual C++/G++/QT++,Com,DirectX,Open CV,EMGU CV , embedded System Development , [Raspberry PI]. ,html,Javascript,Jquery,Ajax.CSS , Networking ,Cyber security, Ethical Hacking You can see my professional profile at http://linkedin.com/in/johnsontaugustine Email : johnsonaugustine@live.com

Friday, 6 December 2013

Redirect http request to https in plesk/cpanel/hsphere control panels and IIS and Apache

Redirect http request to https in plesk/cpanel/hsphere control panels and IIS and Apache simply use the following script

open a note pad , and just create an html page as index.html , then put the following html

<html>
<head><title>Redirecting...</title></head>
<script language="JavaScript">
function redirectHttpToHttps()
{
       var httpsURL= "redirect url to https";
    window.location = httpsURL;
}
redirectHttpToHttps();
</script>
<body>
</body>
</html>


If you are using asp.net pages you can set a rule in web.config

<rule name="HTTP to HTTPS redirect" stopProcessing="true">
  <match url="(.*)" />
    <conditions>
      <add input="{HTTPS}" pattern="off" ignoreCase="true" />
    </conditions>
  <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
</rule>

No comments:

Post a Comment

Note: only a member of this blog may post a comment.