[英]CodeIgniter deployed on an Apache server in a subdomain - Redirect Looping
我正在将codeigniter应用程序部署到由第三方apache服务器托管的子域上。 访问页面时,它会不断刷新,然后浏览器告诉我正在发生重定向循环。 我知道它与Apache conf设置和我使用的自定义.htaccess文件有关,但我不知道如何解决它。
当前的.htaccess代码:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]
尝试另一个.htaccess
:
RewriteEngine on
RewriteCond $1 !^(index\.php|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L]
如果不是,请尝试将最后一行更改为
RewriteRule ^(.*)$ /index.php/$1 [L]
另外,请确保已将config.php中''
$config['index_page']
设置$config['index_page']
''
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.