Forum
.htaccess for friendly categories
I have a list and detail set of products at /products/index.php
Each product has one or more categories allocated to it.
Using this htaccess rule I can clean up the ?cat=
part when displaying products in a particular category.
RewriteRule ^products/([a-zA-Z0-9-/]+)$ /products/?cat=$1 [L]
Enabling me to view the list of products in a particular category at the url: /products/products/gifts-for-the-girls/
However, I'd really like to lose the extra /products/
from the category path and just have the url to be /products/gifts-for-the-girls/
How can I achieve this?
Thanks.
I think that just comes down to how you write out the link in your template, doesn't it?
Sorry, you're right. It is just down to the link and how to filter: