MediaWiki index.php aus der URL entfernen

Bei rofro's solution bedient und ein bißchen angepasst. Bis jetzt scheint alles so zu funktionieren wie es soll.

/wiki/LocalSettings.php:

$wgScriptPath = "/wiki"; $wgScript = "$wgScriptPath/index.php"; $wgRedirectScript = "$wgScriptPath/redirect.php"; ## If using PHP as a CGI module, use the ugly URLs $wgArticlePath = "$wgScriptPath/$1";

/wiki/.htaccess:

RewriteEngine on # Verifying if user forgot to put trailling slash. If so, we'll rewrite to Main_Page RewriteCond %{REQUEST_URI} ^/wiki$ RewriteRule ^(.*) /wiki/index.php?tile=Main_Page [L] # Don't rewrite requests for files in MediaWiki subdirectories, # MediaWiki PHP files, HTTP error documents, favicon.ico, or robots.txt RewriteCond %{REQUEST_URI} !^/wiki/docs/ RewriteCond %{REQUEST_URI} !^/wiki/extensions/ RewriteCond %{REQUEST_URI} !^/wiki/images/ RewriteCond %{REQUEST_URI} !^/wiki/includes/ RewriteCond %{REQUEST_URI} !^/wiki/languages/ RewriteCond %{REQUEST_URI} !^/wiki/maintenance/ RewriteCond %{REQUEST_URI} !^/wiki/math/ RewriteCond %{REQUEST_URI} !^/wiki/skins/ RewriteCond %{REQUEST_URI} !^/wiki/tests/ RewriteCond %{REQUEST_URI} !^/wiki/(redirect|texvc|index).php # Make sure there is no query string (Unless user is making a search) RewriteCond %{QUERY_STRING} ^$ [OR] RewriteCond %{REQUEST_URI} ^/wiki/Special:Search # Rewrite http://wiki.domain.tld/article properly, this is the main rule RewriteRule ^(.*) /wiki/index.php/$1 [L,QSA]