I'm trying to redirect the URLs of a client's website like this:
www.localsite.com/immobile.php?id_immobile=24
In something like this:
www.localsite.com/immobile/24.php
I'm using this rule in .htaccess but it returns a 404 error page.
RewriteEngine On
RewriteCond %{QUERY_STRING} ^id_immobile=([0-9]*)$
RewriteRule ^immobile\.php$ http://localsite.com/immobile/%1.php? [L]
I have tried many other rules, but none work. What can I do?