diff --git a/hosts/hainich/services/lantifa.nix b/hosts/hainich/services/lantifa.nix index 25883da..06746af 100644 --- a/hosts/hainich/services/lantifa.nix +++ b/hosts/hainich/services/lantifa.nix @@ -26,6 +26,11 @@ in { sha256 = "0d4f2ygglz4w515a7lgw59500q3xmr92xxhsmh8p204yaa769x8v"; }; in '' + // Configure short URLs + $wgScriptPath = ""; + $wgArticlePath = "/wiki/$1"; + $wgUsePathInfo = true; + require_once('${wikidb}/WikiDB.php'); $wgExtraNamespaces = array( 100 => "Table", 101 => "Table_Talk",); $wgWikiDBNamespaces = 100; @@ -59,6 +64,11 @@ in { hostName = "wiki.lantifa.org"; listen = [ { port = 80; } ]; adminAddr = "admin@hacc.space"; + extraConfig = '' + RewriteEngine On + RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/index.php [L] + RewriteRule ^/*$ %{DOCUMENT_ROOT}/index.php [L] + ''; }; }; };