FEATURE #2951 simon_w: Use 301 redirect on Director::forceWWW()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64231 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-10-14 21:06:15 +00:00
parent be0d3e37c5
commit 391848f79b

View File

@ -527,7 +527,7 @@ class Director {
$destURL = str_replace('http://', 'http://www.', Director::absoluteURL($_SERVER['REQUEST_URI']));
}
header("Location: $destURL");
header("Location: $destURL", true, 301);
die("<h1>Your browser is not accepting header redirects</h1><p>Please <a href=\"$destURL\">click here</a>");
}
}