I'm working with a blog that has been around for a long time but was migrated to WordPress from a different platform recently. All of the old URLs are mapped to new permalinks via 301 redirects in .htaccess. Most of these redirects behave as expected, except for redirects that involve search queries. When redirecting a search query from the old the platform's structure to the WordPress structure, the redirect does not take effect and the user receives a 404. Normally, this wouldn't be of huge concern, but Google is crawling these and alerting in the client's search console.
So, for example, this produces expected results:
Redirect 301 /p/about-me.html https://www.example.com/about/
This, however, does not redirect and results in a 404:
Redirect 301 /search?q=avengers https://www.example.com/?s=avengers
Perhaps this has to do specifically with how WordPress is handling the query strings for searches, but it's not something that I've seen before.