1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Help] .htaccess infected ? 2000 RewriteRule!!! How can I clean them?

Discussion in 'Black Hat SEO' started by kunu56, Dec 1, 2013.

  1. kunu56

    kunu56 Junior Member

    Joined:
    Nov 22, 2009
    Messages:
    178
    Likes Received:
    52
    Hello all,
    More than 2000 RewriteRule in 2 of my .htaccess files. Asked the host and replay its may infected with a malware. 2 weeks ago the host told me that there was a file infected in my account and was removed. I used online scans ,tutorials and security plugins and all says my sites are clean. But know found this RewriteRule.

    - How to get a fresh new .htaccess file ?
    - How to make sure my sites and host account are clean ? ( using wordpress ).
    - Many tutorials online did not really help, since I do not know how to read codes. Any guide you know that may help me to understand how to fix this issue and learn?

    Here is a sample of .htaccess file :

    HTML:
    RewriteRule ^robet/gods-hustler-of-mars-epub/$ ./imghax/index.php?p=12579480&q=vcard-download-in-firefox [L,QSA,NC]
     RewriteRule ^robet/how-do-you-usgi-cydia-on-ipod/$ ./imghax/index.php?p=12579650&q=download-aplicativos-para-windows-phone-7.5 [L,QSA,NC]
     RewriteRule ^robet/nek-si-claudia-te-astept-cabs-la-nesfarsit/$ ./imghax/index.php?p=12579820&q=download-video-clip-zing.mp3 [L,QSA,NC]
     RewriteRule ^robet/mytouch-3g-slide-2-2-posh/$ ./imghax/index.php?p=12579990&q=download-spartacus-gods-of-the-arena-episode-1 [L,QSA,NC]
     RewriteRule ^rzpkmap/$ ./imghax/index.php?p=125459&q= [L,QSA,NC]
    Thanks in advance.
     
  2. laowai

    laowai Power Member

    Joined:
    Feb 27, 2011
    Messages:
    522
    Likes Received:
    184
    If you have a backup you could restore the original .htaccess file, if not then you can try simply to remove your .htaccess file as its not needed by default for WP and see if your site functions normally without the file and the url structure is same and works. If the site doesn't work after removing .htaccess file then its better to hire someone to clean it and keep the lines added by plugins you have installed.
     
    • Thanks Thanks x 1
  3. mickyfu

    mickyfu Jr. VIP Jr. VIP Premium Member

    Joined:
    Dec 14, 2011
    Messages:
    5,275
    Likes Received:
    15,441
    Location:
    Jennifers Office.
    Just delete all the text in the file and save it.
     
    • Thanks Thanks x 1
  4. kunu56

    kunu56 Junior Member

    Joined:
    Nov 22, 2009
    Messages:
    178
    Likes Received:
    52
    My host replayed fast.
    they are going to do a malware scan and replace the .htaccess with a new one.

    Not sure if this enough.