waylan at gmail.com
Wed Oct 19 20:58:09 CDT 2005
On 10/19/05, H. Fox <haganfox at users.sourceforge.net> wrote:
> On 10/18/05, Bronwyn Boltwood <arndis at gmail.com> wrote:
> > On 10/15/05, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > > However, it makes perfect sense to me that perhaps one would want a
> > > non-existent page to produce a "404 Not Found" for certain applications.
> > > I'll see about adding this as an option into the core.
> > >
> > I want this too, and need it for a few sites already. :) Text should be
> > customizable, so that I can direct people to appropriate pages and give them
> > a searchbox to use.
> This probably goes without saying but I'll throw it in anyway: Other
> status codes should be possible, don't you think?
Absolutely! Say a page is deleted. Someone follows a bookmark to that
now nonexistent page. The wiki just offers to create the page. It
should say the page was deleted (410) or moved to a new location (301)
or some other similar message. Of course, the error message could also
offer to create the page if the admin so wishes. Seeing that it's
pretty easy to send http headers (including error code headers) with
PHP, is shouldn't be to difficult. Just have PmWiki determine which
code is appropriate and insert the proper message into the
PageNotFound page. Maybe even create some special markup for
displaying the error code and message.
Of course, if the URL requesting the page includes 'action=edit', then
we can assume the page should be created and skip the error message
stuff. How does that sound.
Another reason the http header should be sent, not just the message in
PageNotFound is that that tells search engines and the like what too
do with the page. Without the error code, the now deleted page would
still be indexed, but with the offer to create the page (unless,
Pmwiki redirects to PageNotFound - I don't remember - even then the
status code should be sent with the redirect). I don't know about you,
but I don't want that page indexed. Sending the code would take care
of that, and possably other similar issues.
> For example; from the W3C:
> "The 410 (Gone) status code SHOULD be used if the server knows,
> through some internally configurable mechanism, that an old resource
> is permanently unavailable and has no forwarding address."
> See also status code 301 (Moved Permanently)
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
waylan at gmail.com
More information about the pmwiki-users