Forum Moderators: phranque
I'm developing an e-commerce application that consists of a number of product categories each with a number of products assigned.
A sample web address currently looks like:
[mysite.com...]
I want to use .htaccess and mod_rewrite to rewrite this URL to a more SEO friendly:
[mysite.com...]
Can somebody please guide me as to how i can get the url rewriting like so?
thanks!
So, you will need to rewrite any "mobile-phones" URLs to your products.php script (or to a script) which can establish the association by accessing your database.
Generally, the easiest way to do this is to simply add this function to your existing script. However, if it's an off-the-shelf script that you cannot modify, or if doing so would mean recurring modifications every time a new version of the script is released, then a good solution is to call your own "wrapper" script which does this "association lookup" function, and then #includes the off-the-shelf script.
Jim
[edited by: jdMorgan at 4:56 pm (utc) on Dec. 29, 2008]