I'm making a little REST API in PHP but I'm trying to rewrite URL with .htaccess
I'm trying to rewrite URL like this
localhost/api/object_attributes/1/1
to
localhost/api/object/1/attributes/1
In my .htaccess I already made a condition to remove .php
but the second one is not working.
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^api/ api.php
RewriteRule ^api/object/1/attributes/1 /object_attributes/1/1
</IfModule>
I searched on the web but didn't find any solution and I get no errors / redirections.