[pmwiki-users] I need help with clean URLs

H. Fox haganfox at users.sourceforge.net
Mon Aug 14 22:32:33 CDT 2006


On 8/14/06, info at theburroughsproject.com <info at theburroughsproject.com> wrote:
>  there are only 2 things in my main
> directory: My .htaccess file, and my "pmwiki" folder, which contains a
> fresh install of PmWiki 2.1.12

Ah, now I see what's happening (or at least I think I do).  Your wiki
is not in fact in the document root, but in a pmwiki/ subdirectory.
(That's better!)

I can reach your wiki at

http://www.howtofreaks.com/pmwiki/pmwiki.php

The document root is one directory above the wiki's directory.  This
means you have something similar to

http://www.pmwiki.org/wiki/Cookbook/CleanUrls#dir_above

except the rewritebase is / .

Try these:

# Use mod_rewrite to enable "Clean URLs" for a PmWiki installation.
RewriteEngine On
# Define the rewrite base.  It's not necessarily PmWiki's directory.
RewriteBase /
# Send requests without parameters to pmwiki.php.
RewriteRule ^$           pmwiki/pmwiki.php  [L]
# Send requests for index.php to pmwiki.php.
RewriteRule ^index\.php$ pmwiki/pmwiki.php  [L]
# Send requests to pmwiki.php, appending the query string part.
RewriteRule ^([^/a-z].*) pmwiki/pmwiki.php?n=$1  [QSA,L]

<?php if (!defined('PmWiki')) exit();
## Use "Clean URLs".
$EnablePathInfo = 1;
$ScriptUrl = "http://www.howtofreaks.com";
## more configuration settings...

Hagan




More information about the pmwiki-users mailing list