mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-04 00:37:56 +02:00
BUGFIX Undefined variable destURL in Director::forceWWW() (regression from r107094)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108492 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
0d042e9a06
commit
c7bef99190
@ -662,7 +662,7 @@ class Director {
|
|||||||
*/
|
*/
|
||||||
static function forceWWW() {
|
static function forceWWW() {
|
||||||
if(!Director::isDev() && !Director::isTest() && strpos($_SERVER['HTTP_HOST'], 'www') !== 0) {
|
if(!Director::isDev() && !Director::isTest() && strpos($_SERVER['HTTP_HOST'], 'www') !== 0) {
|
||||||
str_replace(Director::protocol(), Director::protocol() . 'www.', Director::absoluteURL($_SERVER['REQUEST_URI']));
|
$destURL = str_replace(Director::protocol(), Director::protocol() . 'www.', Director::absoluteURL($_SERVER['REQUEST_URI']));
|
||||||
|
|
||||||
header("Location: $destURL", true, 301);
|
header("Location: $destURL", true, 301);
|
||||||
die("<h1>Your browser is not accepting header redirects</h1><p>Please <a href=\"$destURL\">click here</a>");
|
die("<h1>Your browser is not accepting header redirects</h1><p>Please <a href=\"$destURL\">click here</a>");
|
||||||
|
Loading…
Reference in New Issue
Block a user