No way am I an expert on this, but this is what I have, (lot to take in on a Friday night)
(As an aside, I find that using the original url still works too)
Attached is my 'url factory' which you can include on the framework template, or any page which needs it, put both pages in the same folder, and edit as required.
Included are several functions, but the key ones are
which take in several parameters and recreate a 'friendly' url on the fly
for example, on a menu category link, to list all products in a paticular category, instead of products.php?CategoryID=2
change the link as follows
<a href="<?php echo make_category_url($row_rscategory1['CategoryName'], $row_rscategory1['CategoryID']); ?>">
<?php echo $row_rscategory1['CategoryName'];?></a>
on a product detail link, the link would be changed to <?php echo make_category_product_url($row_rsproducts['CategoryName'], $row_rsproducts['CategoryID'], $row_rsproducts['ProductName'], $row_rsproducts['ProductID']); ?>
This leaves the htaccess file which is as follows...
# Rewrite keyword-rich URLs Single Parameter
RewriteRule ^.*-C([0-9]+)\.html$ /products.php?CategoryID=$1 [L]
# Rewrite keyword-rich URLs Two Parameters
RewriteRule ^.*-C([0-9]+)-.*-P([0-9]+)\.html$ /productdetails.php?CategoryID=$1&ProductID=$2 [L]
Apologies if my explanation is as clear as mud, but come back to me if you need to.