Category: routes

Symfony – I am not redirected to login when accessing user route

I have these routes: … * @Route(“/”, name=”home”) */ public function homeAction(Request $request) … … * @Route(“/{slug}”, name=”request_list”) */ public function listAction(Request $request) … access_control: – { path: ^/, role: IS_AUTHENTICATED_ANONYMOUSLY } – { path: ^/login, role: IS_AUTHENTICATED_ANONYMOUSLY } -…

Symfony Routing Issue After Changing Apache Configuration File

I have an issue with my symphony project, Let me explain step by step what changes I made. My old working project: URL of my old project looks like http://127.0.0.1/my_project/something httpd.conf file Alias /my_project/something/auth /opt/www/my_project/auth <Directory /opt/www/my_project/auth> AllowOverride None Require…

Symfony router component: does annotation priority tag affect performance?

We are installing a standalone symfony/routing component and according to this blog post, the routing component supports priority annotation property since version 5.1. Our traffic is ~3M page views per day, so performance is relatively important. Is it a good…

Routes stopped working for an unknown (Symfony) [closed]

It worked perfectly before my make:user command. #index: # path: / # controller: AppControllerDefaultController::index # nom de la route index: path: / controller: AppControllerAdvertController::index test: path: /test controller: AppControllerSecurityController::login This is how my routes.yaml looks at the moment. The routes…

How can I generate a route with javascript variables in Symfony?

I try to use javascript routing in Symfony according to this tutorial: https://symfony.com/doc/master/bundles/FOSJsRoutingBundle/usage.html Here is my code: … “render”: function (data, type, row, meta) { return Routing.generate(‘get-file’, { fileId: data }); } … Amd the scripts: <script src=”{{ asset(‘bundles/fosjsrouting/js/router.min.js’) }}”></script>…