Merge pull request #137 from chillu/pulls/redirect-contributing

Auto-redirect /contributing to current master docs (fixes #121)
This commit is contained in:
Damian Mooyman 2016-06-10 11:59:24 +12:00 committed by GitHub
commit 0a9cbd5cb1
1 changed files with 4 additions and 0 deletions

View File

@ -41,6 +41,10 @@ ErrorDocument 500 /assets/error-500.html
RewriteCond %{REQUEST_URI} ^/?framework/en/
RewriteRule ^framework/en/(.*)$ /en/$1 [R=301,NC,QSA,L]
# Docs in /contributing are version agnostic, and should always point to latest
RewriteCond %{REQUEST_URI} !(4.0)
RewriteRule ^(.*)/(.*)/contributing/?(.*)?$ /$1/4.0/contributing/$3 [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
RewriteCond %{QUERY_STRING} ^(\bid\b=([^&]*)&?(.*)?)