like alot of people, im totally new to mod-rewrite. im using it to enable google to see my web site better.
the FAQs talk about my problem. basically, i have index.php, with a parameter to identify what product to load. for example:
- Code: Select all
www.mywebsite.com/index.php?product=202
however, product 123 is actually shoes (its not really but for the purpose of explanation it can be). ive got loads of products, each with a different numberic ID. what i actually want to display in the address bar is:
- Code: Select all
www.mywebsite.com/shoes
so in my .htaccess file i have:
- Code: Select all
RewriteEngine on
RewriteRule ^(allproducts)$ /index.php?product=193 [NC,L]
RewriteRule ^(shoes)$ /index.php?product=202 [NC,L]
RewriteRule ^(hats)$ /index.php?product=142 [NC,L]
RewriteRule ^(pants)$ /index.php?product=141 [NC,L]
etc
etc
the list is quite long, and rather than have a seperate rule for each product i would like to have one general rule.
of the 4 suggestions in the FAQs, the first three are not possible solutions. i am trying to understand the 4th suggestion - could someone elaborate on this please ?
thanks !
