.htaccess文件在我的localhost中正常工作但是当我在远程服务器上上传时,重定向无法正常工作 .
当我与任何用户登录然后尝试从该站点注销然后它再次显示我已登录但它在我的本地Web服务器上正常工作
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
<Files "index.php">
AcceptPathInfo On
</Files>
这是我的退出控制器
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class logout extends CI_Controller {
public function __construct()
{
parent::__construct();
}
function index()
{
$this->home_model->unsetsessions();
redirect('', 'refresh');
}
}?>
1 回答
这个.htaccess在我的CI项目中运作良好: