Hello,
This maybe totally off-the-mark. But maybe we can do this via
mod_rewrite, ie:
1. Rewrite /en/* or /id/* and pass it as GET as $lang
2. Retrieve $lang via $this->params['url']['lang'] in beforeFilter
3. Adjust $this->params['base'] and $this->params['url'] and
possibly $this->base to reflect the current request path
Here's the .htaccess file that I used (minimally tested). As usual,
use at your own risk.
Perhaps, people more knowledgable in mod_rewrite will be able to
rewrite it better.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^en?/(.*)$ index.php?url=$1?&lang=en [QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
On Sep 7, 11:53 pm, cakeFreak <[email protected]> wrote:
> Hey guys,
>
> does anybody has any good suggestion for converting the application
> routing to international SEO friendly uri?
>
> like:
>
> http://mydomain.com/en/homehttp://mydomain.com/it/home
>
> etc?
>
> To change $this->base mybe?
>
> Dan
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---