[TriLUG] Lighttpd rewriting for pmwiki

Jason Faulkner jasonlf at gmail.com
Mon Feb 20 13:44:48 EST 2006


I'm trying to setup pmwiki on my lighttpd server, and I want to setup
the pretty URLs.

Well, I'm having an issue converting the provided apache rewrite rules
to the format lighttpd uses.

This is the information they provide for apache, but even after RTFM
on lighttpd rewriting, I can't seem to figure out the correct syntax
to do this.

Any help would be appreciated. Thanks.

Before: http://www.example.com/~someuser/pmwiki/pmwiki.php?n=Main.HomePage
After: http://www.example.com/~someuser/pmwiki/Main/HomePage


# Use mod_rewrite to enable "Clean URLs" for a PmWiki installation.
RewriteEngine On
# Define the rewrite base.
RewriteBase /~someuser/pmwiki
# Send requests without parameters to pmwiki.php.
RewriteRule ^$           pmwiki.php  [L]
# Send requests for index.php to pmwiki.php.
RewriteRule ^index.php$  pmwiki.php  [L]
# Send requests for files that exist to those files.
RewriteCond %{REQUEST_FILENAME} !-f
# Send requests for directories that exist to those directories.
RewriteCond %{REQUEST_FILENAME} !-d
# Send requests to pmwiki.php, appending the query string part.
RewriteRule (.*)         pmwiki.php?n=$1  [QSA,L]



--
Jason Faulkner
------------------------
OldOs.org Owner/Admin //
OpenDocument Fellowship Sysadmin


More information about the TriLUG mailing list