Page 1 of 1

HTTP Redirect to HTTPS

Posted: Fri Sep 06, 2013 12:47 am
by DamianS
For me I never use HTTP since it allows users to send password unsecured over the internet. I would like to see the option to forward HTTP requests to the HTTPS port (whatever port that has been setup in the software). Currently I have to set the HTTP server to a nonstandard port, then install IIS and use it just to do a simple redirect.

BTW - Still an AWESOME PRODUCT!!!

Damian :)

Re: HTTP Redirect to HTTPS

Posted: Fri Sep 06, 2013 12:55 pm
by DamianS
I have found an alternative to installing IIS (as I really do not like that resource hog installed on my system). Please note that this will only work if you are using the standard port 443 for your HTTPS connections.

1. Open the following file in notepad "C:\Programs Files (x86)\TSplus\Clients\www\template.html"
2. Please search for the original code shown below and change accordingly:

[ORIGINAL CODE]
<script type="text/javascript" src="software/java/third/sha256.js"></script>
<script type="text/javascript">
// --------------- Page Configuration ---------------
var page_configuration = new Array();


[NEW CODE]
<script type="text/javascript" src="software/java/third/sha256.js"></script>
<script type="text/javascript">
// --------------- Custom Configuration ---------------
var loc = window.location+'';
if (loc.indexOf('http://')==0){
window.location.href = loc.replace('http://','https://');
}
// --------------- End of Custom Configuration ---------------

// --------------- Page Configuration ---------------
var page_configuration = new Array();



While this works, I would still prefer the option in the TSplus webserver to force HTTP connections automatically to the configured HTTPS port.

Damian

Re: HTTP Redirect to HTTPS

Posted: Thu Jul 31, 2014 7:51 pm
by Brian
This re-direct doesn't work for me?

My Standard port is 443 for HTTPS and the port for HTTP is 8081. Does my HTTP port have to be 8080 for this to work properly?

Re: HTTP Redirect to HTTPS

Posted: Tue Aug 05, 2014 2:12 pm
by admin
The patch given by DamianS will work fine, however you have to apply it not only in the template.html file but also for your current web access page (usually the index.html file located in C:\Program Files (x86)\TSplus\Clients\www ).
The template.html file will only be used if you re-generate your web access page using our Webmaster Toolkit ;)

var loc = window.location+'';
if (loc.indexOf('http://')==0){
loc = loc.replace('http://','https://');
window.location.href = loc.replace(':8080','');
}

Re: HTTP Redirect to HTTPS

Posted: Sun Feb 15, 2015 3:40 pm
by Barton
Please, tell me how can I redirect to port 8443 ?

Thanks!

Re: HTTP Redirect to HTTPS

Posted: Tue Feb 17, 2015 6:51 pm
by admin
Hello,

You will find this information here : tsplus.net/support/kb/faq.php?id=6