Q:

.htaccess allow extra characters at the end of URLS

If i have 100s of pages:
 http://www.example.com/category/product1/
 http://www.example.com/category/product2/
 http://www.example.com/category/product3/
 http://www.example.com/category/product4/

etc
I would like the pages to be also accessable via
 http://www.example.com/category/product1-1/
 &
 http://www.example.com/category/product1-2/

 http://www.example.com/category/product2-1/
 &
 http://www.example.com/category/product2-2/

Using ReWrite in .htaccess
Thanks

A:

Perhaps, this is what you're looking for:
RewriteEngine on
RewriteBase /

RewriteCond %{REQUEST_FILENAME} ! -d # not a dir
RewriteCond %{REQUEST_FILENAME} ! -f # not a file
RewriteRule ^([^/]+/.+?)-\d+(/.*)?$ /$1$2 [L]

This would resolve /any_category/any_product-[any_number]/ internally as /any_category/any_product/. If you want the browser URL to change as well use [R=301,L] instead.