Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Symfony]Uruchamianie app.php po wejściu na stronę
Szymciosek
post
Post #1





Grupa: Zarejestrowani
Postów: 1 168
Pomógł: 126
Dołączył: 5.02.2010
Skąd: Świdnica

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


Witam
jak zrobić (może to tylko kwestia htaccess, ale wątpię dlatego pytam) aby po wejściu na stronę www.xxx.pl uruchamiał się od razu folder www.xxx.pl/web ?

oczywiście nie chce mieć tego widocznego w url.


Przy zmianie w htaccess (dodaniu) web/app.php otrzymuję błędy:

Kod
No route found for "GET /labs/Symfony/site/"

404 Not Found - NotFoundHttpException
1 linked Exception:
ResourceNotFoundException ?

[2/2] NotFoundHttpException: No route found for "GET /labs/Symfony/site/"  

[1/2] ResourceNotFoundException:    

Logs  

1 error
Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest".
Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\RouterListener::onEarlyKernelRequest".
Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\SessionListener::onKernelRequest".
Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest".
Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\RouterListener::onKernelRequest".
Notified event "kernel.exception" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelException".
Notified event "kernel.exception" to listener "Symfony\Component\HttpKernel\EventListener\ExceptionListener::onKernelException".
Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /labs/Symfony/site/" (uncaught exception) at F:\WORK\labs\Symfony\site\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\EventListener\RouterListener.php line 83
Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest".
Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\RouterListener::onEarlyKernelRequest".
Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\SessionListener::onKernelRequest".
Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest".
Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\RouterListener::onKernelRequest".
Notified event "kernel.request" to listener "Symfony\Bundle\AsseticBundle\EventListener\RequestListener::onKernelRequest".
Notified event "kernel.controller" to listener "Symfony\Bundle\FrameworkBundle\DataCollector\RequestDataCollector::onKernelController".
Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ControllerListener::onKernelController".
Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ParamConverterListener::onKernelController".
Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::onKernelController".
Notified event "kernel.controller" to listener "JMS\SecurityExtraBundle\Controller\ControllerListener::onCoreController".



Dodam jeszcze, że próbowałem też dodać w głównym katalogu plik index.php, który będzie miał w sobie include ('web/app.php');
lecz nie zdało to egzaminu, po prostu gdzieś ścieżki do zdjęć itd itp pouciekały.

Ten post edytował Szymciosek 10.10.2012, 19:25:35
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Szymciosek
post
Post #2





Grupa: Zarejestrowani
Postów: 1 168
Pomógł: 126
Dołączył: 5.02.2010
Skąd: Świdnica

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


  1. /**
  2.   * @Route("/", name="homepage")
  3.   * @Template()
  4.   */
  5. public function indexAction()
  6.  
  7. /**
  8.   * @Route("/gallery", name="gallery")
  9.   * @Template()
  10.   */
  11. public function galleryAction()
  12.  
  13. /**
  14.   * @Route("/shop", name="shop")
  15.   * @Template()
  16.   */
  17. public function shopAction()
  18.  
  19. /**
  20.   * @Route("/about_us", name="about_us")
  21.   * @Template()
  22.   */
  23. public function aboutAction()
  24.  
  25. /**
  26.   * @Route("/contact", name="contact")
  27.   * @Template()
  28.   */
  29. public function contactAction()


Dodam, że po bezpośrednim wejściu w web/app.php oraz sam folder web wszystko działa jak nalezy.
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: 10.10.2025 - 17:31