【发布时间】:2022-01-13 21:32:31
【问题描述】:
我正在使用 wordpress Genesis 主题。我的 .htaccess 代码如下。
# 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_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^(.*)radio\.php(.*)$ - [L]
RewriteRule ^(.*)content\.php(.*)$ - [L]
RewriteRule ^(.*)about\.php(.*)$ - [L]
RewriteRule ^(.*)lock360\.php(.*)$ - [L]
RewriteRule ^(.*).php(.*)$ /index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
即使在删除现有的 .htaccess 文件并更新新文件后,该文件仍会使用上述代码进行更新。
我怀疑文件已损坏。请建议我如何停止此自动更新?
【问题讨论】:
-
也许是主题或某些插件进行了这些更新? (虽然那样会很奇怪,如果那些也删除了 WP cmets。)我会先切换到默认主题并禁用所有插件,然后看看问题是否仍然存在。
-
谢谢!如果可能,请帮我详细解答。