changed: making a redirect from SSL connection to non SSL

if either use_ssl in the config if false
         or if use_ssl_only_for_logged_users is true
         and a user is not logged
added:   base url redirect HTTP codes to the config
         // if current connection is without SSL and should be made through SSL
         // or if is via SSL and should be done in plain text
         // then we make a redirect
         // default: 303
         int use_ssl_redirect_code;

         // when the HOST_HTTP environment variable is not equal to 'base_url'
         // (the part 'http://' and the last slash is removed)
         // the server will redirect into base_url + 'REQUEST_URI'
         // it's useful when you want to redirect from 'mydomain.tld' into 'www.mydomain.tld' etc.
         // set this option to false if you have multiple subdomains
         // default: false
         bool base_url_redirect;




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@847 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2012-06-07 00:26:37 +00:00
parent 2c38fe180e
commit e0dd85ca99
4 changed files with 100 additions and 18 deletions

View File

@@ -162,12 +162,14 @@ void Config::AssignValues(bool stdout_is_closed)
use_ssl_static = Bool(L"use_ssl_static", false);
use_ssl_common = Bool(L"use_ssl_common", false);
use_ssl_only_for_logged_users = Bool(L"use_ssl_only_for_logged_users", true);
use_ssl_redirect_code = Int(L"use_ssl_redirect_code", 303);
base_url = Text(L"base_url");
base_url_static = Text(L"base_url_static");
base_url_common = Text(L"base_url_common");
base_url_redirect = Bool(L"base_url_redirect");
base_url_redirect = Bool(L"base_url_redirect", false);
base_url_redirect_code = Int(L"base_url_redirect_code", 301);
NoLastSlash(base_url);
NoLastSlash(base_url_static);