ci中的url重写,去掉index.php
2015-03-20 11:46
218 查看
在apche conf文件中配置
<Directory "/var/www/html/xxx">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
其中xxx指你的ci目录
然后再在ci目录中添加.htaccess文件,内容如下
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /xxx/index.php/$1 [QSA,PT,L]
</IfModule>
<Directory "/var/www/html/xxx">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
其中xxx指你的ci目录
然后再在ci目录中添加.htaccess文件,内容如下
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /xxx/index.php/$1 [QSA,PT,L]
</IfModule>
相关文章推荐
- CI路径中如何去掉index.php
- 去掉php框架CI默认url中的index.php
- 【转】CI去掉index.php
- CI框架路由去掉index.php
- CodeIgniter学习笔记四:CI中的URL相关函数,路由,伪静态,去掉index.php
- CI框架apache和nginx环境下面统一去掉路径URL后面的index.php
- 使用URL重写,去掉index.php
- PHP CodeIgniter(CI)去掉 index.php
- CI去掉index.php
- CI去掉index.php
- CI框架在 nginx 服务器上配置 rewrite 去掉 index.php 的方法:
- 去掉CodeIgniter(CI)默认url中的index.php的步骤(完整版)
- 去掉CI默认url中的index.php
- PHP CodeIgniter(CI)框架中去掉 index.php方法
- CI 框架去掉url 中index.php的方法
- 去掉CodeIgniter(CI)默认url中的index.php
- CI 框架怎么去掉隐藏入口文件 index.php
- yii url重写去掉index.php
- CI去掉 URL 中的 index.php