字preSS擦除的.htaccess - 卡在重定向循环 [英] Wordpress erasing .htaccess - gets stuck in redirect loop

查看:115
本文介绍了字preSS擦除的.htaccess - 卡在重定向循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了Word preSS使用Scriptaculous的我的网站的根目录,发现我无法访问由于重定向循环。我的地址栏看起来像 http://site.com/site.com/site.com ...

I installed Wordpress to the root of my site using Scriptaculous and found I was unable to access it due to a redirect loop. My address bar would look like http://site.com/site.com/site.com...

我发现有这个网站,所以从另一个WP复制安装它创造了一个没有.htaccess文件:

I found that there was no .htaccess file for this site so created one by copying it from another WP install:

# 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

这使我的网站的工作。但是我发现,在仪表板的一些动作完全抹去htaccess文件,所以它看起来是这样的:

This made my site work. However I've found that some actions in the dashboard totally erase the htaccess file so it looks like this:

# BEGIN WordPress

# END WordPress

更改固定链接做了这一点,并试图编辑一个页面确实太时,似乎有时。当.htaccess文件看起来像这样的网站陷在一个循环再次,直到我复制回旧的信息。有什么建议给我吗?

Changing permalinks did this and it seems that sometimes when trying to edit a page it does it too. When the .htaccess file looks like this the site gets stuck in a loop again until I copy back the old info. Any suggestions for me?

推荐答案

这听起来像一个插件或你的主题与重写规则和htaccess文件瞎搞。

It sounds like a plugin or your theme is messing around with the rewrite rules and the htaccess file.

禁用缓存(如果有的话有,如果你使用的是一个在您的wp-config.php文件一个定义),所有插件和恢复的内置主题,然后重新启用事情之一逐一直到你发现一个被破坏的东西(你的缓存插件是一个很好的起点)。

Disable the cache if any (there's a define in your wp-config.php file if you're using one), all plugins and revert to one of the built-in themes, then reenable things one by one until you spot the one that is breaking things (your caching plugin is a good place to start).

如果您无法访问,因为同样的问题,管理区,临时重命名plugins文件夹中,例如插件禁用重置激活插件。

If you can't access the admin area because of the same issue, temporarily rename the plugins folder to e.g. plugins-disabled to reset the active plugins.

这篇关于字preSS擦除的.htaccess - 卡在重定向循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆