-2

I just uploaded symfony site to the server but it's routing is not working. my app/config/routing.yml is look like this

    acme_data:
        resource: "@AcmeDataBundle/Resources/config/routing.yml"
        host:   "etc.makemeright.in"
        prefix:   /

    acme_blog:
        resource: "@AcmeBlogBundle/Resources/config/routing.yml"
        host:   "makemeright.in"
        prefix:   /

    app:
        resource: "@AppBundle/Controller/"
        type:     annotation 

But when i hit http://www.makemeright.in it call a Controller in AppBundle while it should be calling according to @AcmeBlogBundle/Resources/config/routing.yml".

Maybe it's not recognizing host or something else.

This project is working fine on my local system. what I am doing wrong ?? please help.

I followed Steps to move Symfony 2 project to hosting? to upload my site to server.

Community
  • 1
  • 1
Sunil Chhimpa
  • 404
  • 1
  • 4
  • 12
  • Is there a reason that you use "makemeright.in" rather than "www.makemeright.in" in the acme_blog route, since "www.makemeright.in" is the site being browsed? – cilefen Jul 16 '16 at 21:18
  • It is standard way to write it. But i also tried with www an http also. But no change in result. – Sunil Chhimpa Jul 17 '16 at 04:08
  • 1
    Thanks cilefen. may be i tried only with http . its working fine with www. thanks a lot. – Sunil Chhimpa Jul 17 '16 at 07:39

1 Answers1

1

If you are browsing the app at "www.makemeright.in", then the file should be:

acme_data:
    resource: "@AcmeDataBundle/Resources/config/routing.yml"
    host:   "etc.makemeright.in"
    prefix:   /

acme_blog:
    resource: "@AcmeBlogBundle/Resources/config/routing.yml"
    host:   "www.makemeright.in"
    prefix:   /

app:
    resource: "@AppBundle/Controller/"
    type:     annotation 
cilefen
  • 387
  • 1
  • 4
  • 7