Bulk Redirects are a good option but just keep in mind
Bulk Redirects are a good option but just keep in mind

example.com/*/*/*.htm/$1/$2example.com/category/*/*.htm and dest. url /category/$1cdn-cgi/trace outputs and cf-ray headers. Reproduced the issues from Digitalocean (AMS), Hetzner (FSN) and my home ISP (KPN NL) which is routed via AMS..cf domain .cf is the Internet country code top-level domain (ccTLD) for the Central African Republic. It is administered by the Central African Society of Telecommunications.- .cf | Wikipedia

.cf = cloudflare 
example.com/*/*/*.htm/$1/$2example.com/category/*/*.htm/category/$1cdn-cgi/traceCF-RAY: 7fe67f97d87f3a52-FRA
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>cloudflare</center>
</body>
</html>.cf.cf = cloudflare