Routing in Silex/Symfony. Providing a default route

前端 未结 2 1689
傲寒
傲寒 2021-02-04 14:18

I\'m attempting to do something using Silex (which uses the Symfony routing component - so the answer may be applicable to Symfony as well)

I am adding Silex to a legacy

2条回答
  •  被撕碎了的回忆
    2021-02-04 15:01

    I found the answer within the symfony cookbook...

    http://symfony.com/doc/2.0/cookbook/routing/slash_in_parameter.html

    $app->match('{url}', function($url){
        //do legacy stuff
    })->assert('url', '.+');
    

提交回复
热议问题