[Pmwiki-users] ChangePmWikiURL / mod_rewrite
J. Perkins
jason
Mon Mar 15 19:20:57 CST 2004
Patrick R. Michaud wrote:
> A lot of configuration issues have come across
> the listserv lately that come down to problems with
> the mod_rewrite modification suggested by
> http://www.pmichaud.com/wiki/PmWiki/ChangePmWikiURL .
I'm using mod_rewrite here and I have no problems with the stock 0.6.9
release. I thought I had added some notes to the ChangePmWikiURL page,
but either they have scrolled off the history or I was just
hallucinating. I have to admit that I find that page somewhat
perplexing, as I am not sure exactly what problem it is trying to address.
I needed to remove the "pmwiki.php" from the URL (because I was trying
to wikify an existing site and didn't want to break all of my links).
I'm running on Linux/Apache (modwest.com).
I installed PmWiki as normal and made sure it was working. Then, in the
directory where PmWiki is installed, I created an .htaccess file:
RewriteEngine on
RewriteRule ^([A-Z].*) /os/path/to/pmwiki.php/$1 [L]
Then in my config.php, I added the line:
$PageUrlFmt = '/$Group/$Title_';
Note that I did *not* change the value of $ScriptUrl, this is what
breaks the upload and other features. I had a couple of directories
containing non-wiki content, I was able to exempt them from the rewrite
rule by inserting the following line before the RewriteRule:
RewriteCond %{REQUEST_URI} !^/path-to-ignore
And that's it! So far everything works great, including uploads.
I think the best approach is to clean up the documentation on the
ChangePmWikiURL page. PmWiki seems to handle the redirection just fine.
Jason
More information about the pmwiki-users
mailing list