您的位置:首页 > 编程语言 > PHP开发

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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: