I tried to create a 410 error page but realized that I actually created a 302 redirect to a 410.php
page. Instead I want to use a 410 error to block out an infinite number of dynamically created pages that are being indexed by Google. I have about 30k internal links that are indexed on Google thanks to a faulty internal search engine:
http://www.example.com/?searchkey=1_q
http://www.example.com/?searchkey=2ak
- (etc... goes on for 30k times)
What should I write in htaccess
to block anything with this "searchkey" parameter such that a 410 error page is served? (I'm not a programmer, so I would appreciate a simplified response.)