Hi! I'm new to mod_rewrite and need to do something for my client.
Suppose I have the www.mydomain.com/products.php?prod_id=32.
This product has a section (clothes) and a name (shirt). These names and sections are unique.
In a SEO-Friendly Url, it should be www.mydomain.com/products/clothes/shirt/.
I know I can create
RewriteRule ^products/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ products.php?section=$1&name=$2
I can do that, and it works. But I want people who enter www.mydomain.com/products.php?prod_id=32 to be redirected to www.mydomain.com/products/clothes/shirt/ (changed in the browser itself). How can I do that without inserting the id in my url? Is it possible to call a "pre-processing" php file in my .htaccess, and recreate "products.php?section=$1&name=$2"?
Anyone has a good link with really detailed explanation of mod_rewrite?
Thanks!