傻瓜青蛙~~ 发表于 2013-8-26 01:25:44

诡异的rewrite

http://test.leyohome.com/home/xpress
这样子就没问题
http://test.leyohome.com/这样子就500错误

.htaccess文件

RewriteEngine on   
RewriteCond $1 !^(index\.php|resources|test)   
RewriteRule ^(.*)$ /index.php/$1

ubuntu的虚拟主机配置文件

        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory "/srv/www/leyohome/">
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

apache有重启过了,但是就是不知道为什么出这个问题。。。

浪迹天涯 发表于 2013-8-26 09:41:31

application/config/routes.php中的$route['default_controller']有设置吗?

傻瓜青蛙~~ 发表于 2013-8-26 10:31:54

浪迹天涯 发表于 2013-8-26 09:41 static/image/common/back.gif
application/config/routes.php中的$route['default_controller']有设置吗?

有设置

Altair 发表于 2013-8-27 07:38:06

RewriteRule ^(.*)$ index.php?/$1    改成这个规则试试某些服务器 没有那个问号,会报错
页: [1]
查看完整版本: 诡异的rewrite