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