Auto-redirect /contributing to current master docs (fixes #121)

This commit is contained in:
Ingo Schommer 2016-05-30 10:29:37 +12:00
parent c89183834e
commit 5abf2667c0
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=([^&]*)&?(.*)?)