首页 > Web开发 > 详细

ci中的url重写,去掉index.php

时间:2015-03-20 12:39:33      阅读:353      评论:0      收藏:0      [点我收藏+]

在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>

ci中的url重写,去掉index.php

原文:http://www.cnblogs.com/gachal/p/4353243.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!