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.
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.