BUGFIX Fixed rewrite rules for old-style doku.php?id=... links

git-svn-id: http://svn.silverstripe.com/projects/ss2doc/branches/v2@115618 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2011-01-17 20:30:27 +00:00
parent 3fda909e8f
commit 0d8aa71edb
1 changed files with 5 additions and 0 deletions

View File

@ -12,6 +12,11 @@
<IfModule mod_rewrite.c>
RewriteEngine On
# 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=([^&]*)&?(.*)?)
RewriteRule ^doku.php$ http://doc.silverstripe.org/%2?%3 [R=301,L]
# Redirect legacy URLs (assumes we're not redirecting other assets, for performance reasons)
# Note: Just works on top-level domains, not if the webroot is in a subfolder
RewriteCond %{REQUEST_URI} ^(.*)$