RewriteBase产生无限重定向循环

时间:2013-08-05 17:53:29

标签: .htaccess mod-rewrite redirect-loop

所以这就是情况。

我是一名从专用服务器向vps提供服务器迁移任务的新手。我已经迁移了文件和数据库。 2个子目录安装了caribou cms。为了使子目录的链接起作用,我必须根据这个支持文章http://help.electricfunction.com/kb/all-software/i-am-receiving-an-internal-server-error-500-when-attempting-to-access-the-software向每个子目录中的htaccess文件添加一个RewriteBase代码。当我这样做时,我得到一个重定向循环。有谁知道我怎么能以正确的方式做到这一点?

这是其中一个子目录的htaccess中的当前代码。

Options +FollowSymLinks
RewriteEngine On

Options All -Indexes

<IfModule mod_security.c>
SecFilterEngine Off
</IfModule>

<FilesMatch "\.(files|htaccess|htpasswd|license|inc)$">
 Order Allow,Deny
 Deny from all
</FilesMatch>

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php?idstring=$1&%{QUERY_STRING}

redirect 301 /us/article/view/gunslinger http://www.gunslingerfilms.com/

这是我需要添加的代码:

<IfModule mod_rewrite.c>
    RewriteEngine On
        Options +FollowSymLinks
    RewriteBase /app

    <FilesMatch "\.(htaccess|htpasswd|txt)$">
     Order Allow,Deny
     Deny from all
    </FilesMatch>

有人可以帮助我吗?

0 个答案:

没有答案