[pmwiki-users] Clean URLs - get rid of "Main"

Patrick R. Michaud pmichaud at pobox.com
Wed Apr 12 06:50:29 CDT 2006


On Wed, Apr 12, 2006 at 01:18:43PM +0200, Mike wrote:
> Hello,
> 
> I haven't been following all the latest developments (past few months)
> around IMatch, so please forgive if this question has been answered in
> the meantime: Is there a way now to get what I call "totally clean URLs"
> for a pmwiki that does not use groups, such as
> 
> www.server.com/MyFirstPage instead of www.server.com/Main/MyFirstPage?
> 
> Ideally, I'd like to let the "Main" group vanish in any case - in my
> current pmwiki I have a "Main" group and another special-interest group,
> and my users complain that the URLs for the "Main" group are more
> complicated than those of other solutions...

Try this in your local/config.php (it probably won't work, but it's 
worth a try):

    $FmtPV['$PageUrl'] = 
      'PUE(($EnablePathInfo) ? "$ScriptUrl/$name" : "$ScriptUrl?n=$name")';
    $EnableFixedUrlRedirect = 0;

What it does:  It tells PmWiki to generate page urls using just
the name of the page, rather than the group+name.  

There are undoubtedly other places where PmWiki will betray the
existence of the "Main" group (e.g., in search results), but if
the above works then we can adjust those as we find them.

Pm




More information about the pmwiki-users mailing list