HowToRewriteForPMWiki » History » Revision 1
Revision 1/13
| Next »
Anonymous, 2006-02-21 06:07
Rewriting for PMWiki isn't very difficult at all. First of all, I'm assuming you have a hostname setup specifically for your wiki. A vhost of wiki.domain.tld is what I'll use in this example.
Your pmwiki needs to be setup in the root of this host, with pmwiki.php renamed to index.php. This makes life much easier. Now, simply add this snippet to your lighttpd.conf, after enabling mod_rewrite.
{{{
$HTTP["host"] == "wiki.domain.tld" {
url.rewrite-once = ( "^/([a-zA-Z0-9]+)/([a-zA-Z=?0-9.]+)$" => "/index.php?n=$1.$2" )
}
}}}
Now, change your config variables in config.php to the following:
{{{
$EnablePathInfo = 1;
$ScriptUrl = "http://wiki.domain.tld";
}}}
Congratulations, it's setup and working.
Updated by Anonymous almost 19 years ago · 1 revisions