Possible Duplicate:
How to: URL re-writing in PHP?
My intention is to change the variable (id) passed on the URL with another variable (custom text). To more clear I would like to change:
from
www.mysite.com/page.php?id=14
to
www.mysite.com/page.php?id=the_best_product_for_them
or even better
www.mysite.com/product/the_best_product_for_them
There is already a table on my database that associates the id='14' with the text 'the_best_product_for_them' (id, product_name)
I guess this is what wordpress does with permalinks. I know also how to do it manually with a .htaccess file, but I would like to do it dynamically. What I need is a direction where to start from and what is needed to achieve this.
The server is Apache, the code is in PHP.
Many thanks, Giulio