[pmwiki-users] Yet Another CleanUrl Problem

Ian Barton lists at manor-farm.org
Mon Jun 19 08:14:50 CDT 2006


I am trying to implement CleanUrl's. My setup is Apache2 running on
Linux. My wiki directory is http://www.banter.local/ramblings.

In my /ramblings/.htaccess I have:

# Use mod_rewrite to enable "Clean URLs" for a PmWiki installation.
RewriteEngine On
# Define the rewrite base.
RewriteBase /ramblings
# 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 to pmwiki.php, appending the query string part.
RewriteRule ^([^/a-z].*) pmwiki.php?n=$1  [QSA,L]

In /local/config.php

$ScriptUrl = 'http://www.banter.local/ramblings';
$EnablePathInfo = 1;

The wiki is part of  wiki farm with the main part of the pmwiki code
outside the webspace in /var/lib/pmwiki.

Viewing the index page as either http://www.banter.local/ramblings or
http://www.banter.local/ramblings/index.php works correctly. However,
trying to view any other page e.g.

http://www.banter.local/ramblings/Main/UsefulPhoneNumbers

results in a 404 page not found.

Apache's error log shows:

[Mon Jun 19 13:56:14 2006] [error] [client 192.168.0.15] File does not
exist: /var/www/ramblings/UsefulPhoneNumbers, referer:
http://www.banter.local/ramblings/index.php

I have tried setting EnablePathInfo to 0 with no effect.

It looks as though the problem is in the rewrite rule that sends the
query string part.

Any ideas?

Ian.





More information about the pmwiki-users mailing list