Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8204423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:53:59+00:00 2026-06-07T07:53:59+00:00

I am setting up routing that allows the following routing: /client_a/dashboard/ /client_b/dashboard/ I am

  • 0

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 that looks like this:

AcmeMainBundle:
    resource: "@AcmeMainBundle/Resources/config/routing.yml"
    prefix:   /{client}  

The problem I am running into is that the login routing seems to be having issues with the prefix. Here is my entries in the /Resources/config/routing.yml I am importing into the main routing file:

acme_login:
    pattern: /login/
    defaults: {_controller: AcmeMainBundle:Main:login }

acme_login_check:
    pattern: /login_check
    # defaults: This is not required since the Firewall will handle this

acme_logout:
    pattern: /logout/
    # defaults: This is not required since the Firewall will handle this

The login page displays fine, but after the user submits the login page, Symfony throws an error stating:

Unable to find the controller for path "/client_a/login_check". Maybe you forgot to add the matching route in your routing configuration?

It looks to me that Symfony2 is having difficulties with the internal security routing and using a prefix in routing.yml.

Any way to overcome the issue?

NOTE: One way to get around this issue is by changing all the routes in my routing.yml file to include the {client} parameter. The only problem is that this is a very extensive app with a large number of routes. Using the prefix works wonders, except for the security processing during login.

Thanks,

JB

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T07:54:00+00:00Added an answer on June 7, 2026 at 7:54 am

    After quite some research and trying different aspects, there seems to be no good solution at this point using dynamic prefixes in the routing.

    The issue seems to be that the security bundle executes its code before the routing happens, so the routing attributes from the prefix are not available in security.yml, but are rather static paths. This in itself is causing issues, as Symfony then complains about missing attributes and the likes.

    So, the answer is, that in conjunction with a security implementation, the above is not possible, at least not in a way that I found.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to setup a routing system for my rails app that allows for
I would like to know if this method of setting up routing in Zend
Setting onchange event for CheckBoxList using the following code doesn't work. chkListUserGroup.Attributes.Add(onchange, document.forms[0].isRecordModified.value='true';); How
I'm attempting to configure URL routing in my ASP.NET 3.5 WebForms app. Setting up
A default MVC4 application will come with a RouteConfig class that looks something like
Setting up email details in web.config - but no email is being sent! <appSettings>
I am trying to route a URL using codeigniter URL routing. I want to
I am setting up a simple routing system for my new custom MVC framework
I'm trying to construct the flexible URL routing. So the url like en-US/ctrl/act/1/2 should
I am using forms authentication with ASP.NET MVC. Within web.config at application level I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.