route 和 rewrite的问题。冲突了?
本帖最后由 颠木 于 2013-8-2 10:03 编辑route.php 增加一条路由
$route['(:any)'] = "game/index/$1/$2/$3/$4/$5/$6";
这样所有的访问应该全部转向 game类的index函数下
然后按照手册 rewrite:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|asset|admin|robots\.txt)
RewriteRule ^(.*)$ index.php/$1
index函数中echo current_url();
访问XXX.com/index.php/a 打印 XXX.com/index.php/a 正常
访问XXX.com/a 打印 XXX.com/index.php 不正常 -》希望打印 XXX.com/index.php/a
访问XXX.com/a/b 打印 XXX.com/index.php/a/b 正常
求达人解答。。!
ci最新版本
自己写错了。。程序没问题的。。good
页:
[1]