codeigniter:删除index.php不起作用 [英] codeigniter: Remove index.php not working

查看:45
本文介绍了codeigniter:删除index.php不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从网址中删除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文件中的更改

这篇关于codeigniter:删除index.php不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆