用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2541|回复: 1
收起左侧

[讨论/交流] 去掉INDEX.PHP后的问题

[复制链接]
发表于 2009-8-29 00:58:51 | 显示全部楼层 |阅读模式
本帖最后由 chenhan 于 2009-8-29 01:01 编辑

网上都说加的几步是
RewriteEngine on   
RewriteCond $1 !^(index\.php|images|robots\.txt)   
RewriteRule ^(.*)$ /index.php/$1 [L]
还有就是:$config['index_page'] = "";

可是我这样做后IMAGES里的图片却怎么也显示不出来,不知道是不是自己笨,后来硬是把规则改成下面这样才可以,大家帮忙看看,是为什么,这样写合理吗?
<VirtualHost *:87>
    ServerAdmin 127.0.0.1
    DocumentRoot e:/aa
    ServerName 127.0.0.1
    <Directory "e:/aa">
        Options Indexes FollowSymLinks
        AllowOverride ALL
        Order allow,deny
        Allow from all
        RewriteEngine on
        RewriteBase /
        RewriteCond $1 !^(index\.php|images|img|css|js|robots\.txt)
        RewriteRule ^(.*)$ /index.php/$1 [L]
    </Directory>
</VirtualHost>

说明一下,我是在httpd.conf里配置的
发表于 2009-8-29 08:28:21 | 显示全部楼层
关注~

本版积分规则