[Mediawiki-l] Optimization of Rewriting Rules?

Martin Steiger southernapproachwiki at gmail.com
Wed Feb 16 16:33:43 UTC 2005


Right now, I'm using the following working rewriting rules for my
SouthernApproachWiki (http://www.southernapproach.ch/wiki/), however,
they are sometimes slow and might contain errors. Google for example
hasn't indexed my wiki so far, most likely because of the rewriting
rules.

My wiki is located in http://www.southernapproach.ch/wiki/.

== .htaccess ==

RewriteEngine on
RewriteBase /
RewriteRule ^wiki$ /wiki/index.php [L]
RewriteCond %{REQUEST_URI} !^/wiki$
RewriteCond %{REQUEST_URI} !^/wiki/(images|skins)/
RewriteCond %{REQUEST_URI} !^/wiki/(redirect|texvc|index).php
RewriteCond %{REQUEST_URI} !^/error/(40(1|3|4)|500).html
RewriteCond %{REQUEST_URI} !^/favicon.ico
RewriteCond %{REQUEST_URI} !^/robots.txt
RewriteRule ^(.*)$ /wiki/index.php?title=$1 [L,QSA]

== LocalSettings.php ==

$wgSitename         = "SouthernApproachWiki";
$wgServer           = "http://www.southernapproach.ch";
$wgScriptPath	    = "/wiki";
$wgScript           = "$wgScriptPath/index.php";
$wgRedirectScript   = "$wgScriptPath/redirect.php";
$wgArticlePath      = "$wgScriptPath/$1";

Martin



More information about the MediaWiki-l mailing list