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

Mike mike at widowitz.com
Wed Apr 12 06:58:27 CDT 2006


Thanks for the advice! I tried it, but there was no impact at all -
everything works, but works the same way as it used to.

By the way, my pages actually ARE reachable also if the default group
name is left out, but there is a redirection taking place.
So when the user types www.domain.com/MyPage it will take him to
www.domain.com/Main/MyPage - and thus people just don't know that they
can leave out the "Main"....

Regards,
Mike




Patrick R. Michaud wrote on 12.04.2006 13:50:
> 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