CI 重写/index.php/teacher/room/12 这样的地址怎么做?
CI 重写/index.php/teacher/room/12 这样的url地址怎么做?我现在想把/index.php/teacher/room/12 换成/index.php/12,怎么做呢?
写.htaccess 规则可以实现吗?怎么写呢?有这方面的大神?这个问题困扰等好久了!
我现在的目的是要 www.root.com/index.php/teacher/room/12 把这地址隐藏掉
变成www.root.com/index.php
写.htaccess 规则可以实现吗?
如果/teacher/room/12 这部分是固定的,可以隐藏掉。不是固定的绝对不行 可以直接在CI的routes中配置路由规则,例如加多一个
$route['(:num)'] = "teacher/room/$1";
页:
[1]