Home htaccess redirect files with the same name to just one file (been hacked)
 I would like your help to modify my .htaccess file. My site has been hacked and the malware has created thousands of pages and has really hurt my rankings. I have deleted the pages, but I want all of those links to redirect to one 404 page. What do I need to write in .htaccess in order to redirect all of the pages that contain a certain word? I have tried this RewriteCond %{QUERY_STRING} ^(theword) RewriteRule ^\$ https://example.com/404.php [R=301,L] But it doesn't seem to work: the 404 page I created appears, but the link still remains in the browser, just that now it's like this http://example.com/404.php?theword=blablabla Maybe because my site is on a wordpress platform? I want all the pages that start with ?theword= to be redirected entirely and for the new link to appear /404.php not /404.php?theword= Thank you in advance for your help!