Symfony 2.0 - routing

Posted by Agares on Stack Overflow See other posts from Stack Overflow or by Agares
Published on 2010-04-28T18:42:42Z Indexed on 2010/04/28 18:47 UTC
Read the original article Hit count: 329

Filed under:
|

Hi! How can I set up routing in symfony to be like that(if one rule won't work, next should be grabbed):

  1. /controller/action/param/param/param/...
  2. /admin/controller/action/param/param/param/... ("admin" is constant here - name of the bundle)

I tried that:

    homepage:
      pattern:  /
      defaults: { _bundle: HelloBundle, _controller: Hello, _action: index }
    default:
      pattern: /:controller/:action/*
      defaults: { _bundle: HelloBundle }
But it doesn't work, even for the first rule. Sorry for my English, and thanks for any future help ;>.

© Stack Overflow or respective owner

Related posts about symfony

Related posts about php5.3