views:

407

answers:

2

I'm setting up a CakePHP project, and would like all requests passed in to be redirected to one specific controller.

Currently my routing rule is set up like this:

Router::connect('/:action/*', array('controller' => 'files'));

However, this is obviously not the correct way to achieve this, as it is producing several E_NOTICE errors.

A: 

can't you do something like this?

Router::connect('/*', array('controller' => 'parser','action'=>'index'),
                      array('pass'=>array('arg1','arg2'));
Funky Dude
A: 

Your method is correct, it's likely that the E_NOTICE warnings are being produced by the framework itself. This is part of the CakePHP 1.x branch trying to keep PHP4 compatability while essentially backporting a small handful of PHP5 features.

You can either ignore/disable the E_NOTICE warnings, or try using the unreleased CakePHP 2 (PHP5 only) if it concerns you that much.

Robert P