首页 > 解决方案 > .htaccess 文件非常频繁地使用拒绝代码进行更新,并导致仪表板损坏

问题描述

我的 WordPress 网站遇到问题。.htaccess 文件经常使用以下拒绝代码进行更新

<FilesMatch ".(PhP|php5|suspected|phtml|py|exe|php|asp)$">
 Order allow,deny
 Deny from all
</FilesMatch>
<FilesMatch "^(postfs.php|votes.php|index.php|wjsindex.php|lock666.php|font-editor.php|ms-functions.php|contents.php|jsdindex.php|wp-login.php|load.php|template-load.php)$">
 Order allow,deny
 Allow from all
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>

但默认的 .htaccess 代码是

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

如果我也更改为默认代码,但一段时间后它再次使用拒绝代码更新。这个 .htaccess 文件正在文件的所有文件夹中更新。

托管在同一多域托管计划中的所有网站都会发生这种情况。此拒绝代码导致仪表板损坏,并引发了另一个避免修改等问题。

标签: wordpress.htaccessdashboard

解决方案


我认为您有一个一直在下载 webshel​​l 的 cronjob,我从 8 月初就观察到了这种行为。

您是否使用 c-panel 来托管您的网站?如果是这样,请检查您的 cronjobs 是否有一个对域 hello.turnedpro.xyz 有 wget 请求的任务。有一个 bash 脚本已下载并执行以从域下载 webshel​​l,这就是为什么它在您之后不断返回删除。

让我知道事情的后续。


推荐阅读