codeignitor:删除index.php不工作

编程入门 行业动态 更新时间:2024-10-21 17:29:07
本文介绍了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不工作

本文发布于:2023-10-31 18:54:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1546976.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:工作   codeignitor   index   php

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!