On viewing source I see the below href as http instead of HTTPS. So while I get the page content, the page theme is broken.
Code: Select all
<link rel="stylesheet" href="http://realclearagent.net/themes/black-2.0/css/style.css">
Code: Select all
<link rel="stylesheet" href="http://realclearagent.net/themes/black-2.0/css/style.css">
WonderCMS 2.5.11. What version of WonderCMS do you have?
NGINX reverse proxy server doing SSL offload to Apache Web Server2. What type of server do you have? (Apache, NGINX, IIS)
PHP Version 7.0.28-0ubuntu0.16.04.13. What version of PHP do you have?
I have NGINX configured to redirect all HTTP to HTTPS and this of course works.4. How are you currently redirecting the rest of the website to HTTPS? Are you using the better security mode - or did you configure anything for the redirect to work?
Same issue with other themes5. Does the page work with any other theme correctly?
Can you point me to where in the code this happens to help navigate the issue?WonderCMS automatically turns the CSS paths to https if everything is configured correctly on your server.
Hope that answers, thanks much.Answer the above questions and we can slowly start solving the issue.
The above is only partially true. While your NGINX configured server seems to redirect the user to HTTPS, but only AFTER they click a link.I have NGINX configured to redirect all HTTP to HTTPS and this of course works.
Below is the WonderCMS function for generating HTTP and HTTPS URLs in index.php (starting at line 92)Can you point me to where in the code this happens to help navigate the issue?
Code: Select all
public static function url($location = '')
{
return 'http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['SERVER_NAME'] . ((($_SERVER['SERVER_PORT'] == '80') || ($_SERVER['SERVER_PORT'] == '443')) ? '' : ':' . $_SERVER['SERVER_PORT']) . ((dirname($_SERVER['SCRIPT_NAME']) == '/') ? '' : dirname($_SERVER['SCRIPT_NAME'])) . '/' . $location;
}
Code: Select all
return 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_FRONT_END_HTTPS']) && $_SERVER['HTTP_FRONT_END_HTTPS'] == 'on') ? 's' : '') . '://' . $_SERVER['SERVER_NAME'] . ((($_SERVER['SERVER_PORT'] == '80') || ($_SERVER['SERVER_PORT'] == '443')) ? '' : ':' . $_SERVER['SERVER_PORT']) . ((dirname($_SERVER['SCRIPT_NAME']) == '/') ? '' : dirname($_SERVER['SCRIPT_NAME'])) . '/' . $location;
Code: Select all
return 'http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['SERVER_NAME'] . ((($_SERVER['SERVER_PORT'] == '80') || ($_SERVER['SERVER_PORT'] == '443')) ? '' : ':' . $_SERVER['SERVER_PORT']) . ((dirname($_SERVER['SCRIPT_NAME']) == '/') ? '' : dirname($_SERVER['SCRIPT_NAME'])) . '/' . $location;
Code: Select all
$_SERVER['HTTP_FRONT_END_HTTPS']