[Pmwiki-users] are shorter URLs possible?

Patrick R. Michaud pmichaud
Thu Sep 18 13:50:56 CDT 2003

Well, it's sorta possible.  You can configure the system to properly
respond to URLs like
but in general the URLs that PmWiki generates as links to pages will 
have the group name in them--I'm not sure of a way to get PmWiki to
generate URLs w/o the group name.

To get the system to understand /HomePage as being a reference to 
Main.HomePage, you might try:
 1. in the Apache configuration file, create an AliasMatch directive
    similar to:
	AliasMatch ^/([A-Z].*) /file/path/to/pmwiki.php/$1
    This causes any URL paths beginning with an uppercase letter to be
    sent to PmWiki.
 2. in local.php, add the group explicitly to $pagename if one wasn't provided:
        if (preg_match("/^$WikiWordPattern\$",$pagename)) {
          $pagename = "$DefaultGroup.$pagename";

Again, I don't know of a way in PmWiki's current implementation to get it
to strip off the "Main/" group entirely from the URLs it generates--this
would probably require making a change to the FmtPageName() function.

You could also attempt to forego WikiGroups entirely; e.g., by changing
$PageUrlFmt to be "$ScriptUrl/$Title_" and always explicitly setting the 
group part of $pagename to be "Main" in local.php.


On Wed, Sep 17, 2003 at 09:17:35PM -0500, Matt Vance wrote:
> Is it possible to configure PMWiki and/or Apache to leave off the group 
> name or otherwise shorten the URLs for pages in the Main group?  For 
> instance, instead of:
> http://www.pmichaud.com/wiki/Main/HomePage
> . . . it might be:
> http://www.pmichaud.com/HomePage
> Is this possible?
> - Matt
> _______________________________________________
> Pmwiki-users mailing list
> Pmwiki-users at pmichaud.com
> http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com

More information about the pmwiki-users mailing list