I have a lot of 404s on posts without /%category%/ (I have change permalink structure). I have noticed that if I put /anything/ in 404 link as category I'll end up in the right post. How can I solve it? I have around 25k 404s in google console and I need a bulk solution.
My thoughts are either to do it in htaccess or in 404.php (preferably). I was thinking to check request in 404.php and if it misses /category/ just to insert any word and make a new request toward WP to resolve the post.
Any thoughts?