Wildcard redirect matching (any path, specific file)

I’ve got a lot of 404s for requests to wlwmanifest.xml. What is the proper redirect for “I don’t care what path in front, if I end with this, go to /”.

I don’t think that’s possible with Netlify, however I might be wrong. If it was Apache or something, I guess it was possible using some query strings or something, but, since Netlify redirects don’t seem to support regex, I don’t think it can be done.

However, instead of a redirect, I’d suggest you to check the cause of the multiple requests and 404s and try to fix those if possible.

It looks like bots trying to hack a Wordpress site. There’s nothing I can do about that - so I’d just like to get the off my 404 report. :wink:

Oh well, if it’s WordPress, so, I’m guessing it’s on another subdomain and Netlify is just managing your DNS. But, I had found some redirection tips for Wordpress: Understanding WordPress Redirection and regular expressions.

No, it isn’t WordPress. Sorry, to be clear, what I am seeing, I believe, are bots trying to hack my site by hitting a bunch of URLs that point to an XML page. My site is not WordPress. I am not using a CMS. I literally just want to take every request for (something)/soandso.xml and map it to /. It won’t stop the bots, but will make my 404 report “cleaner”.

So, that brings us back to my first reply. I don’t think it’s possible. However, you could ‘try’ blocking the bots using robots.txt. If they’re meant for hacking, they mostly won’t respect the file, but, worth a try if you can get their user agents.