网站报告为恶意,因为重定向

I have for example site example.com in index.php I'm redirecting site

if ($_SERVER['HTTP_HOST'] == 'www.example.com')
header('Location: http://www.example.com/ru/');

Antivirus detect this redirecting as malware, how to change code that, antivirus not detect malware in my redirecting ?

Maybe is good way to use .htacces rewrite:

RewriteEngine on
RewriteBase /

RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule ^$ maindomain.com/ru [L]

?

May be there is some script which is effecting just use meta tag like below:

echo '<meta http-equiv="refresh" content="0; ,URL=http://www.example.com/ru">';