Guest Posted June 15, 2009 Share Posted June 15, 2009 Hi there. I have recently purchased a SSL certificate and I have enabled SSL in both "catalog/admin/includes/configure.php" and "catalog/includes/configure.php". I've got the padlock all sorted but the main problem i'm having is that when I try to login with my test account; it does not go to 'account.php' and just redirects back to the login page! Does anyone know why it might be doing this please? Thanks for your help in advance. Ash Link to comment Share on other sites More sharing options...
Guest Posted June 15, 2009 Share Posted June 15, 2009 Fixed it! catalog/includes/functions/general.php Change: function tep_redirect($url) { if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) { tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false)); } if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url $url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL } } header('Location: ' . $url); tep_exit(); } To: function tep_redirect($url) { if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url $url = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . substr($url, strlen(HTTP_SERVER . DIR_WS_HTTP_CATALOG)); // Change it to SSL } } header('Location: ' . $url); tep_exit(); } Worked a treat... lovely jubbly :) Link to comment Share on other sites More sharing options...
000---000 Posted June 23, 2009 Share Posted June 23, 2009 Fixed it! catalog/includes/functions/general.php Change: To: Worked a treat... lovely jubbly :) Just thought I'd add a note as I've just solved a similar problem: After login no redirect/blank page. I changed the following line (see top quote) $url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL for $url = HTTP_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL And the site sends the user back to the index page without SSL while they shop. Matt Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.