views:

30

answers:

1

Hi -

I have a 1.2 app that I'm updating to 1.3. I need to send all top level requests like /foo to a controller action (/sites/view/$1) if they are not a valid controller. So in my 1.2 app I had a route like this (incredibly ugly I know):

Router::connect('(?!admin|billings|carriers|clips|cliptypes|contacts|domains|faqs|leadcomments|leads|leadnotes|sites|teams|users|signupstart|botickets|salestickets|callplaylists|clipcreators|prospectingplaylists|roles|sitethemes|teamannouncements|teamproducts|teamsupportitems|teamthemes|trainingplaylists|trainingfiles|sitetransfers|stats|paymentperiods|search)(.*)', array('controller' => 'sites', 'action' => 'view'));

In cake 1.3 I receive the missing controller message instead of the request getting sent to sites->view().

Thanks for any help,

Jeremy

+1  A: 

They removed some features in the routing for 1.3:

  1. "First path segments using full regular expressions was removed."
  2. "Next mid-route greedy star support has been removed."

From migration guide: http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3#Library-Classes-1565

See also 1.3 API: http://api13.cakephp.org/class/router#method-Routerconnect

handsofaten