I want to redirect any request that doesn't have the last segment contain a dot to .html
examples:
/travels/
/travels.html
/travels/categories/new-zealand
/travels/categories/main.js
Line 2 and 4 should not be redirected while line 1 and 3 should be redirected to:
/travels.html
/travels/categories/new-zealand.html
I already have this regex that seems to work for capturing: ^(https?:\/\/.+(\..+)*\/)?[^\s.]+$
How do I exactly make this redirect happen? I have a vserver with an apache werbserver that is running and mod_rewrite is enabled. How exactly would the rewrite statement look and where do I put it? If I put it in a .htaccess file, where do I keep that? Inside the root of the page or anywhere?