Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
不带index.php的Codeigniter Url_Php_Codeigniter_Url_Iis 8.5 - Fatal编程技术网

不带index.php的Codeigniter Url

不带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文件与应用程序和

我想创建一个应用程序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文件与应用程序和系统文件夹一起放在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();
并使用数据库进行会话:

您编写过代码吗?如果是,那么就发布它。我想要一个具有更好会话功能的第三方库