Skip to content

Commit

Permalink
Update docsviewer to include versioned "documentation index" page
Browse files Browse the repository at this point in the history
* Add rewrite rules for previous routes
* Add version to matched routing parameters
  • Loading branch information
robbieaverill committed Dec 12, 2016
1 parent 139a667 commit 55cd7c6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ ErrorDocument 500 /assets/error-500.html
# Redirect any version > 3.4 to 3 branch
RewriteRule ^en/3\.[5-9]/(.*)?$ /en/3/$1 [R=301,L]

# Redirect old index links to the current version (via another redirect rule)
RewriteRule ^en/all\/?$ / [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=([^&]*)&?(.*)?)
Expand Down
2 changes: 1 addition & 1 deletion app/_config/routes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Director:
'dev/buildcache/$Action': 'RebuildStaticCacheTask'
'dev': 'DevelopmentAdmin'
'': '->en/'
'$Lang/$Action': 'DocumentationViewer'
'$Lang/$Version/$Action': 'DocumentationViewer'
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 55cd7c6

Please sign in to comment.