Reputation: 13
Recently my website been hacked. In google console is showing urls like: "/Contact?k=63b17fbd214ae34c31b01864c58a701e&c=b-pandora-charm-june" and "/About?k=dacab93a777b7c305b172b9f4f945c58&c=meaning-pandora-elephant-charm" I would like to redirect any url that contains "k" and "c" parameters to 404 or home page without executing these parameters. Any help please Regards
Upvotes: 0
Views: 71
Reputation: 18671
You can use:
RewriteEngine on
RewriteCond %{QUERY_STRING} (?:^|&)k=.*&c= [NC]
RewriteRule ^ /? [R=301,L]
Upvotes: 1