mediawiki rewrite rules only needed with no urlPrefix
This commit is contained in:
parent
c23ec33c77
commit
1e7300ad67
@ -126,7 +126,17 @@ in
|
||||
</Directory>
|
||||
''}
|
||||
|
||||
${optionalString (config.urlPrefix != "") "Alias ${config.urlPrefix} ${mediawikiRoot}"}
|
||||
${if config.urlPrefix != "" then "Alias ${config.urlPrefix} ${mediawikiRoot}" else ''
|
||||
RewriteEngine On
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
|
||||
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/${if config.articleUrlPrefix == ""
|
||||
then ""
|
||||
else "${config.articleUrlPrefix}/"
|
||||
}index.php [L]
|
||||
|
||||
RewriteRule ^/*$ ${mediawikiRoot}/index.php [L] # For syntax hilighter: */
|
||||
''}
|
||||
|
||||
<Directory ${mediawikiRoot}>
|
||||
Order allow,deny
|
||||
@ -137,13 +147,6 @@ in
|
||||
${optionalString (config.articleUrlPrefix != "") ''
|
||||
Alias ${config.articleUrlPrefix} ${mediawikiRoot}/index.php
|
||||
''}
|
||||
|
||||
RewriteEngine On
|
||||
RewriteCond ${mediawikiRoot}/$0 !-f
|
||||
RewriteCond ${mediawikiRoot}/$0 !-d
|
||||
RewriteRule ^(.*)$ ${mediawikiRoot}/index.php [L]
|
||||
|
||||
RewriteRule ^/*$ ${mediawikiRoot}/index.php [L] # For syntax hilighter: */
|
||||
'';
|
||||
|
||||
documentRoot = if config.urlPrefix == "" then mediawikiRoot else null;
|
||||
|
Loading…
Reference in New Issue
Block a user