Jump to content

Recommended Posts

Posted

HTTP to HTTPS on IIS

 

Note: You must have installed the URL Rewrite Module.

 

1. You must https and http make aviable for the domain. (For configure SSL see Google ;-))

post-1520-0-64076600-1506321427_thumb.jpg

 

Then you can configure a Rewrite Rule:

post-1520-0-57922900-1506321315_thumb.jpg

post-1520-0-75874600-1506321324_thumb.jpg

 

 

  • Upvote 1
Posted

or add in web.config:

<rewrite>
 <rules>
  <rule name="Redirect HTTPS" enabled="true" stopProcessing="true">
    <match url="(.*)" />
    <conditions>
    <add input="{HTTPS}" pattern="^OFF$" />
    </conditions>
    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
 </rule>
</rules>
</rewrite>
Posted

Thanks, I don't have IIS running on my server.  Right now I have the website hosted elsewhere.

 

All I have running is my unigui software.

 

Should I start IIS and have no websites, but put in the redirect?

  • 2 months later...
Posted

In case someone need it...

 

if (window.location.protocol === 'http:') {

    window.location.href = 'https:' + window.location.href.slice(5);

};

Where should I put the code ?

Posted

If you have login form, put this to Loginform->Script

If you don't have login form, put this to MainForm->Script.

 

@pedrisco's solution working as expected.

if (window.location.protocol === 'http:') {
    window.location.href = 'https:' + window.location.href.slice(5);
};

Posted

Still not work, ..........

Unless I use a different port for SSL

 

I think if SSL is enabled, we can't get the content if we use http port.... that's why it can't redirect to https...........

unless we use different ports for http and https 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...