我正在为我的网站前端(codeIgniter)和后端(Rain Framework)使用两个单独的框架,但问题是当我在服务器上传代码时它会给出错误“此网页有一个重定向循环”后端(虽然前端工作正常),问题必然是由于.htaccess发生的,我试图在谷歌上找到解决方案,但没有什么对我有用,如果有人可以帮我解决这个问题,我的.htaccess文件是
为前端::
DirectoryIndex index.php
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|adminpanel|web)
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
和后端::
DirectoryIndex index.php
RewriteEngine on
RewriteBase /adminpanel/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|adminpanel|web)
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
我的管理员文件夹是adminpanel。
答案 0 :(得分:0)
你需要在前端重写这一行
RewriteCond $1 !^(index\.php|web)
后端
RewriteCond $1 !^(index\.php|adminpanel)