I'm not sure if there isn't something in ZF that does this automatically,
but you could create a plug-in to check and redirect.

The plug-in would run after routing. You could use the assemble function on
the route to create the preferred link and check that against the requested
URL.

If they don't match, you could redirect to the assembled URL.

Kind regards, 

Vincent de Lau
 [email protected]

> -----Original Message-----
> From: fozzyuw [mailto:[email protected]]
> Sent: Friday, March 20, 2009 4:06 PM
> To: [email protected]
> Subject: [fw-general] Force full URL names
> 
> 
> This seems like it would be simple enough, but I'm wondering if there's
> a way
> to force full URL's?
> 
> If I have a M/C/A URL like this...
> 
> /accounts/login/index
> 
> then that's always shown or redirect too, even if someone types in
> "/accounts/login".  Meaning if someone doesn't type out the whole URL,
> the
> site will auto-redirect to the "proper full" URL.
> 
> So, I type "/accounts/login/" and the site will auto-redirect to
> "/accounts/login/index".  Or I type in "/accounts" and I'll be
> redirected to
> "/accounts/index/index", assuming "index" is the default name.
> 
> Cheers!
> Fozzy
> --
> View this message in context: http://www.nabble.com/Force-full-URL-
> names-tp22621762p22621762.html
> Sent from the Zend Framework mailing list archive at Nabble.com.


Reply via email to