I've got a site which at some point in the past used SEO friendly category pagination for example :
category/subcategory/40.html
category/subcategory/4.html
category/subcategory/15.html
category/subcategory/45.html
category/10.html
category/34.html
category/45.html
category/65.html
The site has since reverted to the default functional URL's such as :
category/subcategory?p=40
category/subcategory?p=4
category/subcategory?p=15
category/subcategory?p=45
category?p=10
category?p=34
category?p=45
category?p=65
Could anyone help with any possible rewrite rules that wouldn't conflict with any other part of the site, but would capture and 301 the previously used to the current?
Thanks in advanced.
RewriteRule ^/?([^/]+(/[^/]+)?)/(\d+)\.html$ $1?p=$3 [L,R=301]
(if you are sure .htaccess rules are being processed currently)