SITE_URL constant incorrect on windows servers

Bug #1057018 reported by Uranium235
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pluck CMS
Fix Committed
Medium
Unassigned

Bug Description

Even though the root directory and https issues have been fixed/addressed in the development branch, windows servers will still not function properly as dirname() return a backslash instead of a forward slash for the document root on windows systems.

fix:

$protocol = 'http';
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && $_SERVER['HTTPS'] != 'off')
 $protocol .= 's';
$directory = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
define('SITE_URL', $protocol.'://'.$_SERVER['HTTP_HOST'].$directory);

Related branches

Uranium235 (uranium235)
description: updated
Revision history for this message
Uranium235 (uranium235) wrote :
Changed in pluck-cms:
status: New → Fix Committed
Changed in pluck-cms:
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.