本文介绍了codeignitor:删除index.php不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图从url中删除index.php。但它不工作!
I am trying to remove index.php from url. But its not working!
使用ubuntu 12.04(LAMP)。
Using ubuntu 12.04 ( LAMP).
CodeIgniter_2.1.2
CodeIgniter_2.1.2
.htaccess文件
.htaccess file
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase /cms1 RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule>在config.php中:
in config.php :
$config['index_page'] = 'index.php'; to $config['index_page'] = '';目录结构:
/var/www/cms1 ->cms1 ->application ->system ->user_guide ->index.php ->license.txt ->.htaccess推荐答案
知道了。 允许更改.htaccess文件
更多推荐
codeignitor:删除index.php不工作
发布评论