I am having trouble writing a rule for following problem in .htaccess. Here is what I need.
WHEN URL IS THIS
www.mysite.com/cat/2011/subcat1/subcat2/product.htm?page=2
IT SHOULD 301 REDIRECT TO THIS
www.mysite.com/cat/2011/subcat1/subcat2/product/2.htm
Can you please tell me how to do this?
Thanks
—– EDITED AND TESTED ANSWER ———-
For any number of subcats: