Skip to content

Commit

Permalink
Added home page redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian Mooyman committed Nov 8, 2017
1 parent 8901421 commit 4bb55a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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=<pagename>
# to /pagename, which can then be matched by the legacy rewrite rules further down
Expand Down

0 comments on commit 4bb55a5

Please sign in to comment.