Looking for a method we can use in our ASP.NET MVC-5 IIS-8 site to return a 410 error response (gone) based on a list of phrases contained in the querystrings.
Why? We're receiving a few hundred daily junk hits from reputable bots (e.g., Google, Bing, Yahoo) for ridiculously named pages that we've never had on our site. I'm thinking that for most of these pages I can test if a given key-phrase exists and, if it does, return the 410. I'd like to return the 410 to tell the bots they can remove their listing permanently thereby providing a gradually improved SEO environment.
Here's a few examples of URL's we're receiving with the key-phrase I would test for in bold.
https://www.example.com:443/apple-touch-icon-precomposed.png
http://ww.w.example.com:80/zdjqhhmtkatt.html
I know this is very do-able with .htaccess in other programming environments so I'm hoping there's also an elegant solution for ASP.MVC.