What about rewrite?

You could make an URL like yoursite.com/pt_br/account/edit be
rewritten to yoursite.com/index.php?lang=pt_br&url=account/edit/, for
instance.

On Jul 3, 9:37 pm, K3 <[EMAIL PROTECTED]> wrote:
> OK, i have written following code and it seems to work:
>
> <?php
>         class AppHelper extends Helper {
>             function url($url=null, $full=false) {
>                         $url_array=Router::parse($url);
>                         if(strpos($url_array['controller'],':')>0) { // to 
> avoid external
> links, mailto etc...
>                                 $new_url=parent::url($url, $full);
>                         } else {
>                                 
> $new_url=str_replace($url_array['controller'], 'en/'.
> $url_array['controller'], parent::url($url, $full));
>                         }
>                 return $new_url;
>             }
>         }
> ?>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to