*
*/
+// Determine current http/https protocol
+$pageProtocol = 'http';
+if (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443') {
+ $pageProtocol = 'https';
+}
+define('GLM_MEMBERS_PLUGIN_HTTP_PROTOCOL', $pageProtocol);
+
// Debug Options
define('GLM_MEMBERS_PLUGIN_ADMIN_DEBUG', true);
define('GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE', true);
// URLs
define('GLM_MEMBERS_PLUGIN_URL', plugin_dir_url(__FILE__));
-$pageProtocol = 'http';
-if (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443') {
- $pageProtocol = 'https';
-}
-define('GLM_MEMBERS_PLUGIN_CURRENT_BASE_URL', $pageProtocol.'://'.$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']);
+$pageUri = explode('?', $_SERVER['REQUEST_URI']); // Bust this up to access URL path and script name only
+define('GLM_MEMBERS_PLUGIN_CURRENT_BASE_URL', $pageProtocol.'://'.$_SERVER['SERVER_NAME'].$pageUri[0]);
// Directories
define('GLM_MEMBERS_PLUGIN_NAME', 'Gaslight Media Members Database');