I have a simple MVC application in PHP, all requests are handled by the following code in my htaccess file:
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
so if for example i have a url like app.com/profile/view/1
the url param will be "profile/view/1", this is segmented by the app and profile controller will be called, view action from the profile controller will be called, and the id 1 will be passed to the view method.
what i want to do is:
app.com/profile/1/seo-friendly-name-of-profile
but this doesn't work because its trying to find the action "1" in the profile controller.
What should i add to the htaccess file to achieve something like that?