Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [ZendFramework][ZendFramework2][ZF2] 404 - problem z routingiem, ZF2 - routing
matwiej
post
Post #1





Grupa: Zarejestrowani
Postów: 110
Pomógł: 0
Dołączył: 1.02.2010

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


Musiałem dodać 3 tagi żeby przepuściło mi temat.

Mam taki oto routing.

  1. <?php
  2. return array(
  3. 'controllers' => array(
  4. 'invokables' => array(
  5. 'Product\Controller\Product' => 'Product\Controller\ProductController'
  6. ),
  7. ),
  8. 'router' => array(
  9. 'routes' => array(
  10. 'product' => array(
  11. 'type' => 'segment',
  12. 'options' => array(
  13. 'route' => '/product[/][:action][/:id]',
  14. 'constraints' => array(
  15. 'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
  16. 'id' => '[0-9]+'
  17. ),
  18. 'defaults' => array(
  19. 'controller' => 'Product\Controller\Product',
  20. 'action' => 'index',
  21. ),
  22. ),
  23. ),
  24.  
  25. ),
  26. ),
  27.  
  28.  
  29. 'view_manager' =>array(
  30. 'template_path_stack' => array(
  31. 'product' => __DIR__.'/../view',
  32. ),
  33. ),
  34. );
  35.  
  36.  


Gdy wywołuje
http://127.0.0.1/zend/public/product
Dostaje 404
Czy może być to spowodowane tym że aplikacja znajduje się dodatkowo w folderze /zend ?

Ten post edytował matwiej 3.07.2014, 20:36:33
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: 23.08.2025 - 12:16