简体   繁体   中英

Wordpress Website Keeps Redirecting to Different Domain

I have a wordpress website but it keeps redirecting to a different domain:

Link is here :

I have tried the following:

  1. Contacted the hosting and they say it is not hacked or compromised
  2. Tried on different computers and browser. On one computer it works fine. 5 other computers and browsers it redirects
  3. I have done the scan by wordfence and sucuri and nothing malicious shows up
  4. I tried to inspect the element but the redirect is so fast its hard to inspect
  5. .htaccess has the following:

The following is the content of the .htaccess file:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

<IfModule mod_headers.c>
<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>

Please help

I know this answer is very late but I'll share my experience to help any one who has this problem. cause of this issue can be a plugin that you downloaded from outside of wordpress.org or some body has access to your wordpress admin account and you doesn't already close editor.php in appearance tab or hacker has your ftp user and password or ... to solve this create a full backup first and save it in your computer in case of doing any mistake and then:

  1. go to theme directory of your wordpress site and delete all of the unused theme because they are infected already.
  2. in active theme edit your functions.php file and delete all extra code inserted by malware. you can search for "wp_vcd" or "wp-tmp" words to find the code.
  3. download latest wordpress installation. then delete wp-include and wp-admin folder and all files in public_html except wp-content folder and .htaccess file and wp-config.php file. after that replace deleted files and folder with downloaded wordpress.
  4. remove all plugins that you downloaded from known source.
  5. finally change all of your passwords like ftp, admin panel, cpanel or direct admin and ... in case if hacker saved your info somewhere. hope this little guide can help someone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM