From 4bb55a51a441333b82810e1e45d1f981426c3e27 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Wed, 8 Nov 2017 16:31:32 +1300 Subject: [PATCH] Added home page redirect --- .htaccess | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index d14883b27..821732e73 100644 --- a/.htaccess +++ b/.htaccess @@ -32,6 +32,9 @@ ErrorDocument 500 /assets/error-500.html RewriteCond %{HTTP_HOST} ^(docs?.silverstripe.com|doc.silverstripe.org|beta.docs.silverstripe.org)$ [NC] RewriteRule ^(.*)$ https://docs.silverstripe.org/$1 [L,R=301] + # Home page redirect + RewriteRule ^(/)?$ /en/4/ [R=302,NC,QSA,L] + # Legacy rewrite from sapphire/ to framework/ namespace RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^framework/main\.php @@ -52,7 +55,7 @@ ErrorDocument 500 /assets/error-500.html RewriteRule ^en/3\.[5-9]/(.*)?$ /en/3/$1 [R=301,L] # Redirect old index links to the current version - RewriteRule ^en/(all|results)\/?$ /en/3/$1 [R=301,L] + RewriteRule ^en/(all|results)\/?$ /en/4/$1 [R=301,L] # DokuWiki rewrite rules: Need to happen before other rules in order to redirect /doku.php?id= # to /pagename, which can then be matched by the legacy rewrite rules further down