Skip to content

Instantly share code, notes, and snippets.

@stas
Created October 1, 2012 21:24
Show Gist options
  • Save stas/3814521 to your computer and use it in GitHub Desktop.
Save stas/3814521 to your computer and use it in GitHub Desktop.
NGINX vbSEO https/http fix.
diff --git vbseo/includes/functions_vbseo_pre.php vbseo/includes/functions_vbseo_pre.php
index db03f74..27a251f 100755
--- vbseo/includes/functions_vbseo_pre.php
+++ vbseo/includes/functions_vbseo_pre.php
@@ -26,7 +26,7 @@ if (!defined('VBSEO_VB_EXT'))
define('VBSEO_VB_EXT', 'php');
function vbseo_is_https()
{
-return isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] != 'off') || isset($_SERVER['HTTP_FRONT_END_HTTPS']);
+return isset($_SERVER['HTTPS']) && ( !empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] != 'off') || isset($_SERVER['HTTP_FRONT_END_HTTPS']);
}
function vbseo_http_s_url($url)
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment