# redirect/ %category%/%postname%.html to /%category%/%postname%

My site was first built with html/css in 2000, and when I rebuilt it with WordPress in 2012, I kept the .html extension in the interest of keeping the same URLs. I'd like to get rid of it now and redirect the old html pages to the new extension-less pages.

My current permalink structure is: /%category%/%postname%.html

I'd like it to be: /%category%/%postname%

To do that, I tried deleting ".html' from the end of the permalink structure, then saving permalinks. Then, I put this in my .htaccess:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)1.html


But it doesn't work -- pages just give me 404 errors that way.

I took a look at the Yoast permalink redirection tool, but that only redirects to /%postname% -- I'm not sure if it's possible to modify the outputted rule to add the category before the postname.

It sounds like you didn't flush your permalinks. Remove what you wrote in your .htaccess. Set what you had that was working before in the custom section of the permalink settings %category%/%postname%.html, save it, select 'plain', save it, then change it to your new settings %category%/%postname% save it, select 'plain', save it, then go to your custom setting and it should work.
(2.) Added this to .htaccess: RewriteRule (.+).html?$https://example.com/$1 [R=301,L] (The rewrite rule in my original question didn't work for me.)