I changed my WP permalinks from ” /%postname%.html ” , not the usual ” /%postname%/ ” to currently ” /%category%/%postname%/ “. I have tried several redirect plugins, but they only seem to redirect if the old structure was the most common ” /%postname%/ “.
I get 404 errors unless i add ” RewriteRule (.+).html$ /$1/ [L,R] ” to .htaccess to first change URL from xxx.html to xxx/. The problem i want to fix is that although everything works fine, i have a total of 2 redirects to get to the final and correct ” /%category%/%postname%/ “. Pagespeed Insights shows this as a landing page redirect problem i should fix. Is there a way to correct this in .htaccess? Thanks.
Read more here: WP Redirect From /%postname%.html To /%category%/%postname%/