Hello
Is anyone able to help me, please, with a 301 redirect query?
I have moved a site from WP to HTML.
With WP the pages had no extension but now they have .htm extensions and I need to be able to redirect the URL's of each page.
I have found various code for that using the .htaccess file and I have it working to redirect greenwidgets.co.uk/used to greenwidgets.co.uk/used.htm.
The problem is that the search engine indexing of my WP sites includes an extra / for each page, ie greenwidgets.co.uk/used/ and I cannot get that url to redirect to greenwidgets.co.uk/used.htm.
The code that I am currently using in my .htaccess is:-
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\..+$
RewriteRule ^(.*)$ /$1.html [R=301,L]
It's the extra / that is causing me havoc!
Does anyone have ideas, please?
Thank you.
Peter