|
发表于 2008-2-1 13:32:58
|
显示全部楼层
我把上面的综合了一下:
一.在Apache中修改:
1.加载rewrite.so
2.修改为AllowOverride All
二.在网站中对应index.php的目录中加入.htaccess文件:
写入:
RewriteEngine on
Options FollowSymLinks
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /ci/index.php/$1 [L]
第四行表示在CI目录中,如果在网站的根目录中,则为RewriteRule ^(.*)$ /index.php/$1 [L]
三.在CI的application/config/config.php中
将$config['index_page'] = "index.php";改为$config['index_page'] = ""; |
|