[MediaWiki-l] Rewrite Rules

Mark A. Hershberger mah at everybody.org
Sun Jan 13 01:17:41 UTC 2013

On 01/12/2013 08:03 PM, Steve VanSlyck wrote:

> # Short url for wiki pages(dunno if [PT,L] is required instead)
> RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/wiki/index.php [L]
> # Redirect / to Main Page(dunno if [PT,L] is required instead)
> RewriteRule ^/*$ %{DOCUMENT_ROOT}/w/index.php [L]

%{DOCUMENT_ROOT} is wrong there.

Try replacing those lines with this:

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^/?wiki/(.*)$ /wiki/index.php?title=$1 [L,QSA]
  RewriteRule ^/*$ /wiki/Main_Page [L,QSA]




Language will always shift from day to day. It is the wind blowing
    through our mouths. -- http://hexm.de/np

More information about the MediaWiki-l mailing list