Dear Kurinnui Aleksandr,

I don't think it's a good idea to make your application rely on
mod_rewrite for custom routing, for two reasons:

First, mod_rewrite may change its behaviour some point in the future,
and therefore your application could be broken.
Second, you may want some day that your application run an IIS server,
alright? And IIS does not understand mod_rewrite rules.

Bye!
Dérico Filho

On Sep 30, 6:36 pm, Куринный Александр <[EMAIL PROTECTED]> wrote:
> How can I use custom mod_rewrite rules with cake?
>
> I don't know mod_rewrite well and I get the following problem:
>
>         initial URL:http://cake/category/?cat=118
>         the URL i want:http://cake/cat/118
>
> To achieve this, I add the following line to .htaccess found in app/webroot
>
> RewriteRule ^cat/([^/]*)$ /category/?cat=$1 [L]
>
> so final .htaccess is somethig like this:
> <IfModule mod_rewrite.c>
>     RewriteEngine On
>     RewriteCond %{REQUEST_FILENAME} !-d
>     RewriteCond %{REQUEST_FILENAME} !-f
>     RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
>     RewriteRule ^cat/([^/]*)$ /category/?cat=$1 [L]
> </IfModule>
>
> How can I get it working?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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