始终坚信
好记性不如赖笔头!

sae 隐藏index.php

SAE不支持.htaccess文件,但我们可以使用SAE提供的AppConfig服务实现伪静态。

在你项目的根目录建立config.yaml文件,代码为:

handle: - rewrite: if(!is_dir() && !is_file() && path~"^(.*)$") goto "index.php/$1"

这样就可以隐藏入口了。

比如这样的地址 http://serverName/index.php/Blog/read/id/1也能通过http://serverName/Blog/read/id/1访问。

]]>

赞(0)
本站未标注原创文章均为转载,如有侵权请告知!二宝博客 » sae 隐藏index.php

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址