-- Yann Nave <[EMAIL PROTECTED]> wrote
(on Thursday, 11 January 2007, 09:05 AM +0100):
> On 1/10/07, Matthew Weier O'Phinney <[EMAIL PROTECTED]> wrote:
>
> Set a default, catch-all route,
>
>
> On config.ini ? How ? :s
Routing rules in the RewriteRouter are LIFO, so the first rule defined
will be the last one matched. Make that particular rule have sane
defaults:
match: /:controller/:action/*
with defaults: controller => default controller, action => default action
That way, if no routes are matched, you'll still go to a sane location.
However, probably the more robust way is to ensure that you have a
__call() implementation in the action controllers that will go to a sane
default page if a particular action does not exist. This can then be
overridden in any given controller so that they can default to an action
in the given controller instead of redirecting. An example was given
in a previous post to this thread.
--
Matthew Weier O'Phinney
PHP Developer | [EMAIL PROTECTED]
Zend - The PHP Company | http://www.zend.com/