That depends. If you were only given the values "weddings" and "black-chair", could you guarantee a 1-to-1 mapping that turns those into (I'm assuming) 4 and 1, respectively? If so, then one answer might be something like Apache's mod_rewrite:
RewriteEngine On
RewriteRule ([^/]+)/([^\.]+)\.html /products.php?catname=$1&productname=$2
(assuming products.php was modified such that it could accept 'name' versions of the two paramters and convert them into 'id' values as previously mentioned).