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

[已结贴]SAE上的CI如何去掉index.php

[复制链接]
发表于 2014-5-9 17:23:23 | 显示全部楼层 |阅读模式
本帖最后由 zps 于 2014-5-9 17:35 编辑

场景:
http://**/index.php/welcome/index
我想去掉index.php

目前:
\application\config\config.php
$config['index_page'] = '';

问题:
SAE如何配置类似.htaccess这个文件。

谢谢了先。


 楼主| 发表于 2014-5-9 17:34:38 | 显示全部楼层
添加SAE的Appconfig
--------------------------------------------------------------------------------------
- rewrite: if ( !is_file() && !is_dir() ) goto "index.php/{QUEARY_STRING}"
--------------------------------------------------------------------------------------
就此结贴!
 楼主| 发表于 2014-5-9 17:51:04 | 显示全部楼层
若需隐藏index.php,在config.yaml中添加以下代码,且修改配置文件 $config['index_page'] = '';

handle:
  - rewrite: if(!is_dir() && !is_file() && path~"/") goto "/index.php/%{QUERY_STRING}"

-----------------------------------------粗心了。

本版积分规则