php - Symfony2 Routes doesn't find route (multilingual) -


i'would redirect visitor project:index page if types in www.url.com/project or www.url.com/en/project

somehow doesn't find routes devined (yes cache cleared several times)

here routes:

dbe_projectlang:     path:     /project/     defaults: { _controller: dbedonacibundle:project:root }     requirements:         _locale: en|fr|de   dbe_project:     resource: "@dbedonacibundle/resources/config/routing/project.yml"     prefix:     /{_locale}/project/     requirements:         _locale: en|fr|de 

and here route controller <- 1 works normally

public function rootaction(request $request) {     $locale = $request -> getlocale();     return $this -> redirect($this -> generateurl('dbe_project', array('_locale' => $locale))); } 

here error message get:

no route found "get /project/" 

thanks help!

the solution described above works. necessary clear cache (it's needed changes in routing):

php app/console cache:clear --env=prod  php app/console cache:clear --env=dev 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -