Merge pull request #3780 from ip1981/master
Fixed rewrite rules for Mediawiki
This commit is contained in:
commit
684e8b241e
@ -34,6 +34,9 @@ rec {
|
|||||||
concatStringsSep = separator: list:
|
concatStringsSep = separator: list:
|
||||||
concatStrings (intersperse separator list);
|
concatStrings (intersperse separator list);
|
||||||
|
|
||||||
|
concatMapStringsSep = sep: f: list: concatStringsSep sep (map f list);
|
||||||
|
concatImapStringsSep = sep: f: list: concatStringsSep sep (lib.imap f list);
|
||||||
|
|
||||||
|
|
||||||
# Construct a Unix-style search path consisting of each `subDir"
|
# Construct a Unix-style search path consisting of each `subDir"
|
||||||
# directory of the given list of packages. For example,
|
# directory of the given list of packages. For example,
|
||||||
|
@ -133,6 +133,7 @@ in
|
|||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
|
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
|
||||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
|
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
|
||||||
|
${concatMapStringsSep "\n" (u: "RewriteCond %{REQUEST_URI} !^${u.urlPath}") serverInfo.serverConfig.servedDirs}
|
||||||
RewriteRule ${if config.enableUploads
|
RewriteRule ${if config.enableUploads
|
||||||
then "!^/images"
|
then "!^/images"
|
||||||
else "^.*\$"
|
else "^.*\$"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user