我正在将codeigniter应用程序部署到由第三方Apache服务器托管的子域上。访问页面时,它会不断刷新,然后浏览器会告诉我发生了重定向循环。我知道它与Apache conf设置和我使用的自定义.htaccess文件有关,但我不知道如何解决它。
当前.htaccess代码:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]
答案 0 :(得分:0)
尝试其他.htaccess
:
RewriteEngine on
RewriteCond $1 !^(index\.php|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L]
如果不是 - 尝试将最后一行更改为
RewriteRule ^(.*)$ /index.php/$1 [L]
另请确保您已将config.php中的$config['index_page']
设置为''