I moved my ecommerce site to a new directory and cart software. Old product URL's were dynamic and formatted like this:
mydomain.com/webstore/ecom.php?store=mystore&action=display&target=ABC+123456

Where ABC+123456 is a unique product identifier. The new URL uses the same identifier, but in a different format and with a trailing.html:

mydomain.com/store/abc-123456.html

So I'm pretty lost with htaccess and using mod_rewrite, but is it possible to take a link like the first one and rewrite & redirect it to the second one using only mod_rewrite and the htaccess file? There is 60,000 + such urls, so it's not possible to create separate entries for each product. I'm open to suggestions regarding the best way to redirect these urls.
Thank you