RobYost Posted September 24, 2017 Share Posted September 24, 2017 I have my program running on port 443. If you connect: https://login.simple-landlord.com if connects fine. but if you connect: http://login.simple-landlord.com it does not connect. Is there something like web.config that I can set up to redirect HTTP to HTTPS? Quote Link to comment Share on other sites More sharing options...
RobYost Posted September 24, 2017 Author Share Posted September 24, 2017 I figured out how to do it. I created a subdomain named: secure then forwarded subdomain login to: https://secure.simpile-landlord.com This seems to work with all cases Quote Link to comment Share on other sites More sharing options...
Jean-Marc Kiener Posted September 25, 2017 Share Posted September 25, 2017 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 ;-)) Then you can configure a Rewrite Rule: 1 Quote Link to comment Share on other sites More sharing options...
Marlon Nardi Posted September 25, 2017 Share Posted September 25, 2017 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> Quote Link to comment Share on other sites More sharing options...
RobYost Posted September 25, 2017 Author Share Posted September 25, 2017 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? Quote Link to comment Share on other sites More sharing options...
pedrisco Posted September 26, 2017 Share Posted September 26, 2017 In case someone need it... if (window.location.protocol === 'http:') { window.location.href = 'https:' + window.location.href.slice(5);}; Quote Link to comment Share on other sites More sharing options...
sidnei_alves1 Posted October 1, 2017 Share Posted October 1, 2017 Preciso configurar algo pra funcionar o isapi com https? Enviado de meu Moto G (5) Plus usando Tapatalk Quote Link to comment Share on other sites More sharing options...
allenchow Posted December 29, 2017 Share Posted December 29, 2017 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 ? Quote Link to comment Share on other sites More sharing options...
pedrisco Posted December 30, 2017 Share Posted December 30, 2017 Where should I put the code ? In UniServerModule.CustomFiles i add a js file containing this code. Quote Link to comment Share on other sites More sharing options...
allenchow Posted January 2, 2018 Share Posted January 2, 2018 Not work.. Unless I use a different port for SSL Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted January 2, 2018 Share Posted January 2, 2018 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); }; Quote Link to comment Share on other sites More sharing options...
allenchow Posted January 2, 2018 Share Posted January 2, 2018 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.