diff --git a/inc/plugins/google_seo/redirect.php b/inc/plugins/google_seo/redirect.php index 013a1f4..99fed7e 100644 --- a/inc/plugins/google_seo/redirect.php +++ b/inc/plugins/google_seo/redirect.php @@ -42,7 +42,10 @@ function google_seo_redirect_current_url() global $settings; // Determine the current page URL. - if($_SERVER['HTTPS'] != "off" && ($_SERVER['HTTPS'] || $_SERVER['SERVER_PORT'] == 443)) + if(isset($_SERVER["HTTP_X_FORWARDED_PROTO"])) + $page_url = $_SERVER["HTTP_X_FORWARDED_PROTO"]."://".$_SERVER["HTTP_HOST"]; + + else if($_SERVER['HTTPS'] != "off" && ($_SERVER['HTTPS'] || $_SERVER['SERVER_PORT'] == 443)) { $page_url = "https://".$_SERVER["HTTP_HOST"]; }