我有一个WordPress的WooCommerce网站,有几个不同的插件。最近,每月大约一次尝试加载主页以外的任何页面都会导致404错误。我已经知道这是因为某些重置.htaccess文件是完全空白的。一旦我重新上传我的备份,它就会被修复。在网上寻找答案,它似乎可能是一个插件造成这一点,但我不知道哪一个,为什么现在呢?我还看到关于#BEGIN Wordpress的建议...#END Wordpress,但是.htaccess文件中已经存在这些信息,以及其他一些代码,我不完全确定它来自哪里。有关如何防止这种情况发生的建议?我的.htaccess权限目前是644,这里是我的代码:。wordpress网站上的.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_mime.c>
AddType application/x-javascript .js
AddType text/css .css
</IfModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/javascript
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>