不带index.php的Codeigniter Url
我想创建一个应用程序url“”。但输入url时,会显示“HTTP错误403.14-禁止”。当我在url(如“”的最后一个)插入'index.php'时,登录页将在浏览器中呈现 我改变了主意不带index.php的Codeigniter Url,php,codeigniter,url,iis-8.5,Php,Codeigniter,Url,Iis 8.5,我想创建一个应用程序url“”。但输入url时,会显示“HTTP错误403.14-禁止”。当我在url(如“”的最后一个)插入'index.php'时,登录页将在浏览器中呈现 我改变了主意 $config['base_url'] = 'http://example.com'; $config['index_page'] = ''; 及 $config['uri_protocol'] = 'REQUEST_URI'; 在config.php文件中。然后,我将.htaccess文件与应用程序和
$config['base_url'] = 'http://example.com';
$config['index_page'] = '';
及
$config['uri_protocol'] = 'REQUEST_URI';
在config.php文件中。然后,我将.htaccess文件与应用程序和系统文件夹一起放在codeigniter根文件夹中。然后在我使用的.htaccess文件中
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
重新启动发动机
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^(.*)$index.php/$1[L]
我只想从url中删除'index.php'。我正在使用IIS 8.5 web服务器。在CI中,您可以在登录成功时设置会话数据:
$this->session->set_userdata('username' $this->input->post('username'))
您可以在注销时取消设置
$this->session->sess_destroy();
并使用数据库进行会话:
您编写过代码吗?如果是,那么就发布它。我想要一个具有更好会话功能的第三方库