i use .htaccess and i have a rule that allow me to dynamically look for product in my database.
so someone can click on a link like this one:
www.domain.com/product/modular-plastic-lunch-set.html
and see the product. Now my problem is, when i use
www.domain.com/product/Modular-Plastic-Lunch-Set.html
it does not work,
why?
here’s my rules:
RewriteEngine On
RewriteRule ^product/([a-z0-9\-]+).html$ products.php?name=$1
It does not work because you don’t have either
A-Zor the[NC]flag.or
I added the L:
and QSA flag:
More information about the flags at: http://httpd.apache.org/docs/2.3/rewrite/flags.html
TIP: if you are looking for products using the name, you might see delay in your query, speically if you don’t have an index. You should look into this before it gets ugly.