views:

47

answers:

0

Below is my current .htaccess file:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [PT]

Currently, the rewrite rule just grabs the GET value and gives it to index.php file. So, if I have a form that logins a user the action would look like this: /user/login

I am using a MVC framework so my parameters are passed after the controller and action: /controller/action/param

I would like for Apache to rewrite the above URL to just show the controller and action. So instead of this:

/controller/action/param/param/param

I would get this:

/controller/action

While the ReWrite at the top still passes the entire /controller/action/param/param to be handled by the router method.

Is this rewrite possible? If so, can you help me to get it working?