Yazuk
Yazuk

Reputation: 13

htaccess 301 redirection when parameter "p" is present in the URL

My wordpress website been hacked and google keeps crawling Urls with a certain parameter leis, My question is, how to radirect to 404 any url containing leis parameter Thanks in advance

Upvotes: 1

Views: 78

Answers (1)

Amit Verma
Amit Verma

Reputation: 41219

how to radirect to 404 any url containing leis parameter?

You can use the following Rule for this :

RewriteEngine on
#If  "leis" is present in the query string
RewriteCond %{THE_REQUEST} \?leis [NC]
#forword the request to 404
RewriteRule ^ - [R=404,L]

Upvotes: 0

Related Questions