I have a website with rental properties and want to change the url with mod_rewrite .htaccess and mysql.
http://www.example/property.php?id=2112
into
http:/www.example/house/spain/costa-del-sol/malaga/2112
each property is in a table called HOUSE I need to get the url stored in the table by referencing the id number.
HOUSE
id - 2112
......
......
......
url - http://www.example/house/spain/costa-del-sol/malaga/2112
I am a newbie to this mod rewrite stuff, I figured I need somesort of .htaccess file that redirects to a php file to do the lookup. Is there a way in .htaccess to only do this lookup if the filename is property.php?id= - otherwise go to my 404.php
Regards
Martyn