如何停止无限重定向循环?

时间:2022-02-12 07:52:50

I have a blog that has a redirect loop, and I can't understand htaccess too well right now (late, and needs to be done by the AM) so am hoping for a quick fix. The site is throwing 301s from xxxxx.org to xxxxx.org/index.php, and back to the beginning. The htaccess file is as follows:

我有一个博客有一个重定向循环,我现在不能理解htaccess(迟到,需要由AM完成)所以我希望快速解决。该网站从xxxxx.org投掷301s到xxxxx.org/index.php,并回到开头。 htaccess文件如下:

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

# END WordPress

redirect 301 /index.html http://www.lawyersclearinghouse.org/index.php

The site was recently listed on google as malicious due to an iFrame injection, so please don't feel the need to visit it (cleaned, but not yet delisted)

由于iFrame注入,该网站最近在谷歌上列为恶意网站,所以请不要觉得有必要访问它(已清理,但尚未摘除)

2 个解决方案

#1


Your rewrite conditions are combined with a logical OR so they will apply in all cases. If the file is a plain file it will not be a directory and vice versa.

您的重写条件与逻辑OR组合,因此它们将适用于所有情况。如果文件是普通文件,则它不是目录,反之亦然。

Your rule is also odd. Are you trying to match all cases? in that case it should presumable be .* (any string of characters) rather than . (any single character)

你的规则也很奇怪。你想要匹配所有案件吗?在这种情况下,它应该是。*(任何字符串)而不是。 (任何单个字符)

#2


Your site seems to work for me. Anyway, make sure index.php exists.

您的网站似乎适合我。无论如何,请确保index.php存在。

#1


Your rewrite conditions are combined with a logical OR so they will apply in all cases. If the file is a plain file it will not be a directory and vice versa.

您的重写条件与逻辑OR组合,因此它们将适用于所有情况。如果文件是普通文件,则它不是目录,反之亦然。

Your rule is also odd. Are you trying to match all cases? in that case it should presumable be .* (any string of characters) rather than . (any single character)

你的规则也很奇怪。你想要匹配所有案件吗?在这种情况下,它应该是。*(任何字符串)而不是。 (任何单个字符)

#2


Your site seems to work for me. Anyway, make sure index.php exists.

您的网站似乎适合我。无论如何,请确保index.php存在。