If the symfony command line generates a bundle and the corresponding address is accessed, the Error 404 is returned.

Source: Internet
Author: User
{Code ...} this statement keeps pressing enter to generate the code and then access app_dev.phphello to display Noroutefoundfor & quot; GEThello & quot; configuration as follows: {code ...} the symfony version is 2.5.6. I only read the official documentation for this framework. I have studied it myself...
php app/console generate:bundle --namespace=Acme/HelloBundle --format=yml

This statement keeps pressing enter to generate code and then access/app_dev.php/hello/to display

No route found for "GET/hello /"

The configuration is as follows:

   #Resources\config\routing.yml    acme_hello_homepage:        path:     /hello/{name}        defaults: { _controller: AcmeHelloBundle:Default:index }   #app\config\routing.yml    acme_hello:    resource: "@AcmeHelloBundle/Resources/config/routing.yml"    prefix:   /

Symfony version 2.5.6
I only read the official documentation for this framework. I will not know why I still cannot.
Which of the following can be improved ~~

Reply content:
php app/console generate:bundle --namespace=Acme/HelloBundle --format=yml

This statement keeps pressing enter to generate code and then access/app_dev.php/hello/to display

No route found for "GET/hello /"

The configuration is as follows:

   #Resources\config\routing.yml    acme_hello_homepage:        path:     /hello/{name}        defaults: { _controller: AcmeHelloBundle:Default:index }   #app\config\routing.yml    acme_hello:    resource: "@AcmeHelloBundle/Resources/config/routing.yml"    prefix:   /

Symfony version 2.5.6
I only read the official documentation for this framework. I will not know why I still cannot.
Which of the following can be improved ~~

Have you tried clearing the cache?
The clear command is:

app/console cache:clear --env=prodapp/console cache:clear --env=dev

Similarly, you need to check whether the route configuration is correct.

app/console router:debug

Route Is/hello/{name}
You can access/hello/mot.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.