mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT Using HTTP Status 301 for RedirectorPage class, to be nice to search engines and improve SEO (with 200 page rank gets split between pages, with 301 its all transferred to the target page)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63181 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
86e37a8225
commit
97263cd09c
@ -119,7 +119,7 @@ class RedirectorPage_Controller extends Page_Controller {
|
|||||||
} else {
|
} else {
|
||||||
$linkTo = DataObject::get_by_id("SiteTree", $this->LinkToID);
|
$linkTo = DataObject::get_by_id("SiteTree", $this->LinkToID);
|
||||||
if($linkTo) {
|
if($linkTo) {
|
||||||
Director::redirect($linkTo->Link());
|
Director::redirect($linkTo->Link(), 301);
|
||||||
} else {
|
} else {
|
||||||
echo "<p>" . _t('RedirectorPage.HASBEENSETUP') . "</p>";
|
echo "<p>" . _t('RedirectorPage.HASBEENSETUP') . "</p>";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user