Fixed rewrite rules for Mediawiki

If Mediawiki was served from the root directory of the server
it was impossible to serve other directories.

Make sure that URLs defined in servedDirs are not rewritten.
Use case: serving local copy of MathJax
This commit is contained in:
Igor Pashev 2014-08-25 11:55:57 +02:00
parent 0383b57b3c
commit cdd1785cd6

View File

@ -133,6 +133,7 @@ in
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
${concatMapStringsSep "\n" (u: "RewriteCond %{REQUEST_URI} !^${u.urlPath}") serverInfo.serverConfig.servedDirs}
RewriteRule ${if config.enableUploads
then "!^/images"
else "^.*\$"