WordPress.org

Ready to get started?Download WordPress

Forums

Redirecting URL hack (3 posts)

  1. Chris M.
    Member
    Posted 4 years ago #

    A while ago my site got affected by the xmlrpc.php bug that lead to URLs like:

    MYSITE/2008/08/21/POSTNAME/%&(%7B$%7Beval(base64_decode($_SERVER%5BHTTP_EXECCODE%5D))%7D%7D%7C.+)&%/

    I've since upgraded to 2.9.2 and locked down file permissions significantly (as well as moved to an upgraded server and a few other things).

    My issue is I can't figure out how to redirect these broken URLs to working URLs (and the broken URLs are still indexed in Google). I'm trying to use mod_rewrite but I just get HTTP 400 errors (bad request) no matter what I do. My latest rewrite attempt was:

    RewriteRule ^(20[0-9]{2}/[0-1][0-9]/[^/]+)/.*base64.*$ http://MYSITE/$1 [L,R=302,QSA]

    I was hoping because the rule was a little less specific it would work, but no luck. All I need to do is strip the base 64 encoded junk at the end off. Anyone have any luck doing this?

    Thanks!

    Chris

  2. alism
    Member
    Posted 4 years ago #

    Is the base64 code still appearing in the links on your site? If so, you'll probably need to re-save your Permalinks to remove that.
    (Admin > Settings > Permalinks)

    If that code isn't still appearing in URLs on your site and you've already fixed that, broken links should disappear from Google without you needing to do anything if you give it a bit of time. You can also remove them with a Webmaster Tools account though too if you really want to and don't want to wait.

    You might want to read these too:
    http://codex.wordpress.org/FAQ_My_site_was_hacked
    http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/

  3. Chris M.
    Member
    Posted 4 years ago #

    They're fixed on my site, and I know that Google will eventually get the right links, but until that happens every visitor from a Google search is just going to get a HTTP 400 error, which is less than ideal. It seems like there must be a way to redirect those old URLs to working ones, but Apache doesn't like them one bit.

    Chris

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.