I’m having a problem with mod_rewrite on my hosting. All is working fine, but I changed my directories organization and so now all pages Google indexed before the change have the wrong extension (I decided to add a .html at the end of the name, now urls look like “www.mydomain.com/page_name/details_on_page/page_id/name_of_resource.html” while before it was like “www.mydomain.com/page_name/details_on_page/page_id/name_of_resource”) and return a 404 error.
How could I write a mod_rewrite COND and then a rule to redirect 301 page with missing html extension to the .html page?
Thanks!
Try this: