codeigniter启用URL模式
来源:互联网 发布:华为多个端口加入vlan 编辑:程序博客网 时间:2024/05/20 22:40
codeigniter启用URL模式
用的是Apache
首先要开启 mod_rewrite
1.要修改Apache 的配置文件,让Apache支持rewrite_module,修改过程如下:打开apache的配置文,conf/httpd.conf :LoadModule rewrite_module modules/mod_rewrite.so,把该行前的#去掉。
2.搜索 AllowOverride None 即 Options Indexes FollowSymLinks MultiViews下面那个,修改为 AllowOverride All (一般情况下是有两个,两个都要修改!)
3.在项目的根目录下新建一个.htaccess文件 内容如下:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
#若你的项目名为:TestCI 则此处应为RewriteRule ^(.*)$ /TestCI/index.php/$1 [L]
</IfModule>
4.重启你的Apache服务即可不用index.php了!
阅读全文
0 0
- codeigniter启用URL模式
- CodeIgniter URL
- CodeIgniter URL
- CodeIgniter lighttpd URL重写
- codeigniter如何支持中文URL?
- Drupal启用Clean Url
- 如何在安装的lnmp一键环境包(nginx)启用pathinfo URL模式
- CodeIgniter 的url中去掉index.php
- Codeigniter(CI) 去掉 URL 中的 index.php
- 去掉CodeIgniter URL中的index.php
- 去掉CodeIgniter URL中的index.php
- CodeIgniter框架去掉url中的index.php
- 去掉CodeIgniter URL中的index.php
- 去掉CodeIgniter URL中的index.php
- 去掉CodeIgniter URL中的index.php
- 去掉CodeIgniter URL中的index.php
- 去掉CodeIgniter URL中的index.php
- 在CodeIgniter删除URL中的index.php
- Vue 开源项目库汇总
- 【JVM】理解GC日志
- structs错误--There is no Action mapped for namespace / and action name"
- Centos6.8 Docker简单入门实战
- Java
- codeigniter启用URL模式
- ubuntu14.04安装MQ7.5
- let和var的区别
- 第10章 Winodws图形处理与文本输入输出
- 关于group by 分组函数控制台显示优化
- VMWare 虚拟机系统 ping 不通主机解决方案
- 判断蓝牙的实用小工具
- 【使用Postman测试WEB接口】设置测试环境与全局变量
- 机器学习的认识