Home  >  Article  >  Backend Development  >  php地址控制器如何隐藏

php地址控制器如何隐藏

WBOY
WBOYOriginal
2016-06-06 20:12:50913browse

http://dev-cateringpc.wssoto.com/index/i...
我想把后面的去掉http://dev-cateringpc.wssoto.com 这样来访问首页
我设置了默认的控制器 但是 每次点首页有变回原来的http://dev-cateringpc.wssoto.com/index/n...

回复内容:

http://dev-cateringpc.wssoto.com/index/i...
我想把后面的去掉http://dev-cateringpc.wssoto.com 这样来访问首页
我设置了默认的控制器 但是 每次点首页有变回原来的http://dev-cateringpc.wssoto.com/index/n...

第一种办法 nginx rewrite
第二种 php内写逻辑,不传index/index,默认制定到IndexController中

如果按照上述办法不行,是否你点击首页生成的链接方法出了问题呢?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn