Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [ZF] rewriteRule
GrayHat
post
Post #1





Grupa: Zarejestrowani
Postów: 566
Pomógł: 18
Dołączył: 23.08.2003
Skąd: Łomża

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


Witam.
Potrzebuje napisac rewriterule pod skrypt napisany w zendzie i mam pewien zwiazany z tym problem...
Napisalem regule:

Kod
RewriteRule ^([0-9]+),([0-9]+).html$ index.php/index/page/category_id/$1/page_id/$2 [L]


jednak nie dziala :/ wymusza kontroler (int),(int).html a powinien odwolac sie do kontrolera index, do akcji page z argumentami category_id i page_id...

Kod
Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (1,1.html)'

prosze o pomoc
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
LBO
post
Post #2





Grupa: Zarejestrowani
Postów: 1 415
Pomógł: 117
Dołączył: 7.09.2005
Skąd: Warszawa

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


Jestem pewien, że można nazywać parametry. Znalazłem przykład:
  1. <?php
  2. $r = new Zend_Controller_Router_Route_Regex(
  3. '([^-]*)-([^-]*)-([^-]*).html',
  4. 'action' => 'show',
  5. 'controller' => 'products',
  6. 'module' => 'default'
  7. ),
  8. 1 => 'product',
  9. 2 => 'number',
  10. 3 => 'category'
  11. ));
  12. ?>


Ale nie wiem czy działa.

Ten post edytował LBO 8.06.2008, 20:46:40
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: 27.12.2025 - 05:24