I have a website built on Joomla/PHP and it was going well until I found a RewriteCond directive in my .htaccess file to a website with porn content.RewriteEngine OnRewriteCond %{HTTP_ACCEPT} text/vnd.wap.wml|application/vnd.wap.xhtml+xml [NC,OR]RewriteCond %{HTTP_USER_AGENT} android|BlackBerry|htc|iPad|iPhone|iPod|kindle|lg|midp|mmp|mobile|mot|nokia|o2|opera mini|J2ME [NC,OR]RewriteCond %{HTTP_USER_AGENT} palm|pocket|psp|sgh|smartphone|sonyericsson|symbian|treo mini|up.browser|up.link|vodafone|wap [NC]RewriteCond %{HTTP_USER_AGENT} !Googlebot-Mobile [NC]RewriteRule ^(.*)$ http://seokirja.com [L,R=302]RewriteCond %{HTTP:Accept-Encoding} gzipRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_URI} !^/index.phpRewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]RewriteRule (.*) index.phpRewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]The host company said that they have found some spam tries to some PHP files. I checked them and I've found some encrypted code.I also checked file permissions and PHP functions, but it seems OK.How can I avoid being the victim of this hacking method?
How can I avoid being hacked?
security;hacking;phishing