Error 404 after rewrite query strings with htaccess
Posted
by
Cristian
on Pro Webmasters
See other posts from Pro Webmasters
or by Cristian
Published on 2014-02-18T10:30:59Z
Indexed on
2014/08/18
16:46 UTC
Read the original article
Hit count: 495
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?
© Pro Webmasters or respective owner