2010年4月21日星期三

Re: [fw-mvc] trailing slashes

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkvO9GAACgkQadOAzz84lo82QQCeODcuB5ejSVESVePvuqkyxUZM
7GsAn12TBVptIYdaHVgbjsNHG1ggGjnI
=5glJ
-----END PGP SIGNATURE-----
Have you tried removind last slash from route? Like this :

$route = new Zend_Controller_Router_Route(
'news/:name',
array(
'controller' => 'news',
'action' => 'showOne'
)
);
--
Rafał (ert16) Trójniak
WEB : http://trojniak.net/
m@il : ert256@gmail.com
Jid : ert256@gmail.com
GPG key-ID : 3F38968F
4711 E3BC B674 C841 BED8
0F8F 69D3 80CF 3F38 968F


Eduard <eduard@bareev.ru>
[Wed, 21 Apr 2010 04:40:16 -0800 (PST)] :

>
> In my current ZF (svn):
>
> "/news" - match news controller, index action
> "/news/" - does not
>
> And route:
> $route = new Zend_Controller_Router_Route(
> 'news/:name/',
> array(
> 'controller' => 'news',
> 'action' => 'showOne'
> )
> );
>
> Match "/news/opening2010",
> but not the "/news/opening2010/"
>
> It is expected behavior?
> How to override it? As for me, presence or absence of trailing slash
> should make no difference.
>
> Thanks in advance, any comments appreciated.

没有评论: