0

在过去的一周里,我开始遇到一些问题,网站无法加载或无法正确加载(主要是在 Chrome 和 Firefox 中),以及永久链接结构重置为 WordPress 默认值的时间,还有几次我'在进行编辑时已从 WordPress 后端注销。

我的网络主机说这很可能是 .htaccess 文件中配置错误的重写规则的错误。我看不出有什么问题(但不确定我是否会知道我是否看到它......)

我发现 htaccess 中提到的唯一一次重写粘贴在下面。

您认为这是问题所在还是其他原因?

谢谢

# BEGIN W3TC Skip 404 error handling by WordPress for static files
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !(robots\.txt|sitemap(_index)?\.xml(\.gz)?|[a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)?)
    RewriteCond %{REQUEST_FILENAME} \.(css|js|htc|html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ [NC]
    RewriteRule .* - [L]
</IfModule>
# END W3TC Skip 404 error handling by WordPress for static files
# 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
4

3 回答 3

0

The admin url for wordpress isn't based on Rewrite rules. If you're being randomly logged out while making edits either the session has been removed or has timed out.

As for permalink structure resetting, it would likely be one of:

  • You or someone else with admin access has told wordpress to do so (intentionally or otherwise
  • The .htaccess file in your base wordpress folder has been deleted
  • The apache conf has been modified to ignore local htaccess / mod_rewrite rules

I'm not entirely sure what you mean by not loading properly, but if it were a htaccess problem I would think it would either work, or it wouldn't. Nothing in between.

于 2012-09-25T10:40:18.480 回答
0

过去一周我开始遇到一些问题,网站无法加载或无法正确加载(主要是在 Chrome 和 Firefox 中),以及永久链接结构重置为 WordPress 默认值的时间,还有几次我'在进行编辑时已从 WordPress 后端注销。

这听起来像是会话超时/cookie 问题,不太可能与您的.htaccess规则相关。

除了可能位于浏览器和服务器中间的防火墙/代理之外,这些事情还可能是由时钟偏差引起的;尝试检查您的服务器和计算机上的时间。

于 2012-09-25T10:42:22.150 回答
0

[1]清除您的网络缓存。

如果这没有帮助:

[2]为您的站点重置 htaccess 文件。重置永久链接设置。

如果这没有帮助:

[3]你最近有更新插件吗?想想最近对网站后端所做的任何更改。

希望这能给你一些想法。

于 2012-09-25T23:10:52.530 回答