[pmwiki-users] Completely clean URLs (Was: Get rid of groups altogether?)
jo at durchholz.org
Wed Oct 26 14:57:01 CDT 2005
Michael Widowitz schrieb:
> Is it possible - under the assumption that one can accept having only a
> single group - to have totally clean URLs as in
> instead of having the group name in between
> (http://mysite.com/Main/HomePage) ?
> I'd also be happy about a definite "no"... :-)
OK, I'll bite...
PmWiki comes preinstalled with three page groups: Main, PmWiki, and
Site. Given that your WWW site is in German, I'd also assume that you'll
have the PmWikiDe group (German translations of PmWiki pages).
The Main group is where you'd install your own pages.
The PmWiki resp. PmWikiDe group contain PmWiki documentation, both for
the administrator and for end users.
The Site group contains pages that contain site-wide configuration data.
I'd try to set up a rewrite rule that maps http://mysite.com/SomePage to
http://mysite.com/pmwiki.php?n=Main.SomePage. I'd make that redirect
internal so that browsers don't "see" it.
What I don't know how to do is making PmWiki generate the right links.
If PmWiki detects a link to another PmWiki page, it will generate a link
to a URL like http://mysite.com/Main/SomePage, and that's not what you
want. I'm pretty sure there's a way to override this behavior, probably
along the lines of "write a small PHP function and hook it into one of
PmWiki's global function arrays". You can take a look at
Cookbook/Functions (unless it's PmWiki/Functions) to see whether that
hook is already documented, otherwise Patrick is the best source of
information for this kind of things.
More information about the pmwiki-users