I am setting up routing that allows the following routing:
/ client_a / Dashboard / / Client_b / dashboard / I am using a prefix in my app / config / routing.yml which looks like this: < / P> AcmeMainBundle: resource: "@ AcmeMainBundle / resources / config / routing.yml" prefix: / {client} The problem I'm running is that Login routing is going to be problems with the prefix I am importing into the main routing file:
acme_login: pattern: / login / default: {code> /Resources/config/routing.yml My entries are in I _controller: AcmeMainBundle: main: login} acme_login_check: pattern: / login_check # default : This is not necessary since the firewall handles this acme_logout: Pattern: / logout / # default: firewall is not required since this handle The login page displayed is okay, but After submitting the user login page, Symphony provides an error:
Discovery of the controller of the path L "/ client_a / login_check". Maybe you forgot to add matching routes in your routing configuration? I think Symfony2 is having difficulty with internal security routing and is using the prefix in routing.yml.
Any way to overcome this issue?
Note: One way to solve this problem is by changing all the routes in my routing.yml file to include the {client} parameter. The only problem is that it is a very comprehensive app with many routes
thanks,
JB
I think you might need to define those methods with an administrator with the default: {_controller: AcmeMainBundle: main: login} . This is not required in default case because the firewall catches it before routing. But in this case it may be required to match the prefix.
Comments
Post a Comment