Our router defines a custom parameter before the controller and action definition:
Router::connect(
'/:store/:controller/:action/*',
array(),
array(
'store' => 'shop\/[^\/]+'
)
);
Router::mapResources('Invoices');
Router::parseExtensions();
It matches requests prefixed with '/shop/x' where x is an id:
http://host.com/shop/1/invoices/view/1
However, the above definition doesn't route REST requests properly:
http://host.com/shop/1/invoices/1.json (doesn't work)
As a workaround, it works by passing the action (which isn't ideal for REST however):
http://host.com/shop/1/invoices/view/1.json
Any ideas on how make the rest route work?