[pmwiki-users] Clean URLs

Oneida Kincaid oneidak at gmail.com
Fri Dec 15 10:00:09 CST 2006


I have a new PmWiki installation at http://www.pwsdots.org/. At one 
point while installing PmWiki I had nice clean urls (e.g., 
http://www.pwsdots.org/Articles.Carnitine) using the following:

(1) In the local/config.php file:

$ScriptUrl = 'http://www.pwsdots.org';
$EnablePathInfo = 1;

(2) an index.php file with <?php include('pmwiki.php');

(3) an htaccess file with:

RewriteEngine On
RewriteBase /
RewriteRule ^$pmwiki.php  [L]
RewriteRule ^index\.php$ pmwiki.php  [L]
RewriteRule ^([^/a-z].*) pmwiki.php?n=$1  [QSA,L]

Then somehow things got messed up and now all links are broken (404 not 
found error) unless I set $EnablePathInfo to 0. However, when I do that, 
all links have a ?n=, e.g., http://www.pwsdots.org/?n=Articles.Carnitine.

Does anyone who understands mod_rewrite better than I do know how the 
?n= can be removed from the urls? I know this question has probably been 
asked a zillion times before, but I've studied the CleanURLs page and 
fiddled and fiddled with things until my brain has turned to mush. Maybe 
someone with a fresh eye on this can see what I'm missing?

Thanks,
Oneida








More information about the pmwiki-users mailing list