Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Symfony][SF2]Routing dla subdomen
Lirdoner
post
Post #1





Grupa: Zarejestrowani
Postów: 500
Pomógł: 1
Dołączył: 29.09.2009

Ostrzeżenie: (0%)
-----


Witam, chciałbym uruchomić dwa różne kontrolery dla strony powiedzmy example.com i dla foo.example.com. Niestety dla foo.example.com dostaję "No route found for "GET /""
routing.yml
Kod
moto:
    resource: "@MotoBundle/Controller/"
    type:     annotation
    prefix:   /

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


MotoBundle:DefaultController
Kod
/**
     * @Route("/", name="homepage", host="foo.example.com")
     * @Template()
     */
    public function indexAction(Request $request)


AppBundle:DefaultController
Kod
/**
     * @Route("/", name="homepage", host="example.com")
     * @Template()
     */


Dla example.com strona uruchamia się poprawnie. Co ciekawe gdy w AppBundle zamienię example.com na foo.example.com to strona uruchomi się poprawnie pod adresem foo.example.com
Ktoś coś wie co robię nie tak?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 24.08.2025 - 20:40