My WordPress has been hacked and cleaned, but now tens of thousands pages return 404 http code from Googlebot and other search engine witch saturate my hosting and SEO is a disaster.
My web site have only ten pages and i would like send an 410 http code for every urls exept my ten pages (and other stuff like images)
Here where I am
RewriteCond %{REQUEST_URI} !^/$ [OR]
RewriteCond %{REQUEST_URI} !^(.*)nos-prestations(.*)$ [OR]
RewriteCond %{REQUEST_URI} !^(.*)pour-les-entreprises$ [OR]
RewriteCond %{REQUEST_URI} !^(.*)wp-content(.*)$
RewriteRule ^ - [G]
But all pages return 410
Where is my mistake ?
Tanks a lot.
Edit, my legitimates URLs
https://www.kidooland.fr
https://www.kidooland.fr/nos-prestations/
https://www.kidooland.fr/pour-les-entreprises/
https://www.kidooland.fr/arbre-de-noel-entreprises/
https://www.kidooland.fr/le-foot-en-salle/
https://www.kidooland.fr/news/
https://www.kidooland.fr/contact/
https://www.kidooland.fr/kidooland-le-parc/
https://www.kidooland.fr/parents-enfants/
https://www.kidooland.fr/le-foot-en-salle/
https://www.kidooland.fr/tarifs-horaires/
2
Answers
With your shown samples, could you please try following. Please make sure you clear your cache before testing your URLs.
You may try this rule at top of your .htaccess, just below
RewriteEngine On
line: