[Catalyst] Handling a path of '/'

A. Pagaltzis pagaltzis at gmx.de
Fri Dec 2 07:02:44 CET 2005


* Chisel Wright <chisel at herlpacker.co.uk> [2005-12-02 00:50]:
> I tend to take the lazy way out. My global default() redirects
> to 'the default application action' [e.g. /client/list] and
> each controller default usually redirects to the appropriate
> list view.
> 
> That way, any rubbish URLs that people use will result in
> seeing something useful, instead of a 404.

That breaks HTTP. A search engine won’t know which URLs are good
and which are rubbish, f.ex. If you want people to see something
useful, send them a 302 to a good URL when they provide rubbish,
or make your 404 page smart enough to provide a link “you
probably meant such-n-such.”

Regards,
-- 
#Aristotle
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;



More information about the Catalyst mailing list