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

Stephan Schildberg schildberg at scoid.de
Wed Sep 14 14:29:00 CDT 2005


>
> Ah, if you're wanting to stay within PmWiki, the easy way to do this
> is to use the $DefaultPageTextFmt variable. This variable contains
> the markup text to be used when a non-existent page is requested.
>
> So, to redirect to another pmwiki page, you can set:
>
> $DefaultPageTextFmt = '(:redirect Main.NoSuchPage:)';
>
> which will redirect requests for non-existent pages to Main.NoSuchPage.
>
>

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

Here you get the usual result:
--------------------------------

PageNotFound
We couldn't find a page called "Sit". You can:

    * Create Sit.Sit <http://www.pmwiki.org/wiki/Sit/Sit?action=edit>?
      <http://www.pmwiki.org/wiki/Sit/Sit?action=edit>
    * Create Sit.HomePage
      <http://www.pmwiki.org/wiki/Sit/HomePage?action=edit>?
      <http://www.pmwiki.org/wiki/Sit/HomePage?action=edit>
    * Create Main.Sit <http://www.pmwiki.org/wiki/Main/Sit?action=edit>?
      <http://www.pmwiki.org/wiki/Main/Sit?action=edit>

Or, perhaps the page you want is listed below:

--------------------------------

It would be so nice to have an owner created 404 page, for naive users.
But if it not feasable that way I would prefer a hardcoded variant to an 
external url.


regards, Stephan.






More information about the pmwiki-users mailing list