NetTalk Central

Author Topic: Problem: Always Redirect To Secure Site - redirects to port 0  (Read 3435 times)

random69

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Email
Hi

As per the documentation for secure sites, I created another webserver object and set the port to 80 and clicked "Always Redirect To Secure Site" with the same WebHandler.

Works - except that it redirects to https://blahblah.com:0 for port 0.

After going through the NT code - found out you need to set _RedirectToHttpsPort to the port to redirect to.

Added an embed right after the webserver object _AlwaysRedirect is set to 1 in the WebServer procedure to set _RedirectToHttpsPort to 443 and now it works.

Want to make sure this is the proper way to do this and would appreciate the documentation be updated to reflect this. I could not find anything further in the docs or forum either.

Version 4.32





Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Problem: Always Redirect To Secure Site - redirects to port 0
« Reply #1 on: June 03, 2009, 11:29:24 PM »
yes, you're right.

The template checks to see if there is another web server object on the same window - one set to Secure, and then uses the port from that. However I've been recommending that folk separate the two servers onto different windows (and there are other times when you won't have them together).

For 4.33 I've added a template setting so that you can specify the port. That will then set the RedirectToHttpsPort property correctly.

Cheers
Bruce