WordPress.org

Ready to get started?Download WordPress

Forums

Return 404 after blog hacked? (4 posts)

  1. raghos
    Member
    Posted 5 years ago #

    Hi,

    My blog was hacked a month or so ago. Although I got everything up and running again, I still have an issue I'm trying to sort out. Google has a lot of those hacked pages in cache:

    http://www.google.com/search?q=site%3Aeldiabloenlosdetalles.net

    (see the fourth link and onwards). All of those 'queries' start with '?ZXcf'. Right now, all those links (malformed queries?) lead to my blog's home page, but I'd like to make them go to a 404 page if I can. Is this possible?

    Thanks!

  2. whooami
    Member
    Posted 5 years ago #

    you dont want to send a 404, you want send a 410, a 'Gone', like this:

    http://www.village-idiot.org/?ZXcfYyAnREShklSYDQzqYQnYjhfHXLhkhGxx

    notice the url?

    a 410 will eventually get those links removed from google.

    That page can be customized so that humans get a link to your blog and googlebot doesnt.

  3. raghos
    Member
    Posted 5 years ago #

    whooami:

    Thanks, but how do I do that? right now, those queries are being redirected to my homepage. How did you do that in your blog?

    Thanks!

  4. raghos
    Member
    Posted 5 years ago #

    just for the sake of posterity, this is the implementation of whooami suggestion:

    Add this to your .htaccess:

    RewriteEngine On
    RewriteCond %{QUERY_STRING} ^ZXcf(.*)$
    RewriteRule .* - [G,L]

Topic Closed

This topic has been closed to new replies.

About this Topic