无限循环重定向 - 如何修复.htaccess文件?

时间:2013-11-10 23:52:35

标签: wordpress .htaccess joomla

我有.htaccess文件在我身上循环。

该网站目前是一个旧的Joomla网站,我正在尝试用Word Press网站取代 我在一个名为/ new的子目录中安装了WP。一旦我对WP网站感到满意,我就会删除Joomla网站。

目前,如果我尝试访问www.mysite.com.au/new上的任何内容,它将无法加载,我收到一条错误消息,表示我有太多重定向。

在顶级我有这个

# @version $Id: htaccess.txt 423 2005-10-09 18:23:50Z stingrey $
# @package Joomla
# @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##

#
#  mod_rewrite in use
#

RewriteEngine On

#  Uncomment following line if your webserver's URL 
#  is not directly related to physical file paths.
#  Update YourJoomlaDirectory (just / for root)

# RewriteBase /YourJoomlaDirectory

#
#  Rules
#

RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|css|js|pl|txt)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php

RedirectMatch permanent ^/ContactUs.htm$ http://www.sitename.com.au/content/view/14/30/

RedirectMatch permanent ^/Contents.htm$ http://www.sitename.com.au/content/view/21/57

RedirectMatch permanent ^/new/$ http://www.sitename.com.au/new/index.php/

在/ new目录中我有这个:

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

# END WordPress

我确信答案很简单,但我看不出来......有什么建议吗?

欢呼声

1 个答案:

答案 0 :(得分:0)

尝试发表评论:

 RedirectMatch permanent ^/new/$...

行以避免无限的掠夺。