I am trying to implement URL rewriting in my PHP application. Can someone share a step by step procedure of implementing URL rewriting in PHP and MySQL?
In my applic
After reading comments and question once again, I've realized that my previous answer is not completely the thing your are looking for. So here some additions, if you want rewrite/redirect/proxy the URL addresses so for example then user types www.f1.com he will actually see www.f2.com, but domain will remain the same, you probably need to setup a reverse proxy using Apache for that. It act's similar to mod_rewrite.
Regarding the second part, since modern crawler also performing the URL link analyses I think your first option is better performance wise.
Previous answer:
And using PHP you can achieve redirection like:
From php.net. Here more examples.