Hi there,
I have created a new website for a company and I would like all the previous search engine results to be redirected. Since there were quite a few pages and most of them where using an id I would like to use something generic instead of re-routing all the old pages.
My first thought was to do that:
Router::connect('/*', array('controller' => 'pages', 'action' => 'display', 'home'));
And put that at the very end of the routes.php file [since it is prioritized] so that all requests not validating with previous route actions would return true with this one and redirect to homepage.
However this does not work.
I'm pasting my routes.php file [since it is small] hoping that someone could give me a hint:
Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));
Router::connect('/company/*', array('controller' => 'articles', 'action' => 'view'));
Router::connect('/contact/*', array('controller' => 'contacts', 'action' => 'view'));
Router::connect('/lang/*', array('controller' => 'p28n', 'action' => 'change'));
Router::connect('/eng/*', array('controller' => 'p28n', 'action' => 'shuntRequest', 'lang' => 'eng'));
Router::connect('/gre/*', array('controller' => 'p28n', 'action' => 'shuntRequest', 'lang' => 'gre'));
Router::parseExtensions('xml');