I have an SEO issue as google has indexed thousands of links (the site was hacked) which are now directed to 404 errors. I need to change these to 410 errors so Google then considers the pages deleted.
All hacked pages follow a system wherby they begin with a letter ‘g’ followed by either a 3, 4 or 5 digit number eg: mysite.com/g108/, mywebsite.com/g4878/ or mywebsite.com/g83425/ Is there a method using a wildcard to redirect these errors to my 410 page? I’m guessing this is a regex that need to be added to my htaccess file.
Thanks