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

[已解决] HMVC的URL能修改吗?

[复制链接]
发表于 2012-3-1 17:07:48 | 显示全部楼层 |阅读模式
HMVC的路径http://localhost/ci/modules/test2/home_made
我知道可以修改成http://localhost/ci/m/test2/home_made
但是能改成http://localhost/ci/test2/home_made吗?
怎么修改?????
 楼主| 发表于 2012-3-1 17:08:15 | 显示全部楼层
@HEX {:soso_e130:}{:soso_e130:}
发表于 2012-3-1 22:27:50 | 显示全部楼层
rewrite rule
 楼主| 发表于 2012-3-2 09:15:08 | 显示全部楼层
阳光笑脸 发表于 2012-3-1 22:27
rewrite rule

HMVC的路径http://localhost/ci/modules/test2/home_made
用rewrite去掉后,那原本的http://localhost/ci/test2/home_made怎么办(不是modules的)?不是两个重叠了???
发表于 2012-3-2 13:50:30 | 显示全部楼层
傻瓜青蛙~~ 发表于 2012-3-2 09:15
HMVC的路径http://localhost/ci/modules/test2/home_made
用rewrite去掉后,那原本的http://localhost/ci ...

用 URI 路由就可以了 用不着 rewrite
 楼主| 发表于 2012-3-2 16:00:44 | 显示全部楼层
Hex 发表于 2012-3-2 13:50
用 URI 路由就可以了 用不着 rewrite

那原本的http://localhost/ci/test2/home_made怎么办(不是modules的)?不是两个重叠了???
发表于 2012-3-2 19:44:18 | 显示全部楼层
傻瓜青蛙~~ 发表于 2012-3-2 16:00
那原本的http://localhost/ci/test2/home_made怎么办(不是modules的)?不是两个重叠了??? ...

不重叠,因为路由是一个规则一个规则处理的,你只需要做很多规则就可以了。
 楼主| 发表于 2012-3-5 16:18:56 | 显示全部楼层
Hex 发表于 2012-3-2 19:44
不重叠,因为路由是一个规则一个规则处理的,你只需要做很多规则就可以了。 ...

明白了,如果是m/c/function,虽然地址是c/function,但是还是modules的。
如果是c/function,那就直接是c/function的,不是modules的

本版积分规则