[pmwiki-users] protection against reading directories | 404 indicator

Patrick R. Michaud pmichaud at pobox.com
Wed Sep 14 15:12:35 CDT 2005


On Wed, Sep 14, 2005 at 09:29:00PM +0200, Stephan Schildberg wrote:
> 
> Although these work pleasantly for mistyped urls like:
> http://www.pmwiki.org/wiki/Site/AllRecentChan
> 
> instead of:
> http://www.pmwiki.org/wiki/Site/AllRecentChanges
> 
> but it does (nufortunately) not apply in the same way for:
> http://www.pmwiki.org/wiki/Sit

You can modify the contents of Site.PageNotFound to
display something different -- you can even do 
(:include Main.NoSuchPage:) if you just want to grab the
contents of some other page.

Or, you can set the value of $PageNotFound to be the page 
you'd like to have displayed instead of Site.PageNotFound:

    $PageNotFound = 'Main.NoSuchPage';

Or, you can force PmWiki to construct a complete pagename even from
a partial url reference:

    $pagename = MakePageName('Main.HomePage', $pagename);

Pm




More information about the pmwiki-users mailing list