- 帖子
- 112
- 积分
- 764
- 金钱
- 113
- 在线时间
- 103 小时
- 注册时间
- 2011-3-5
- 最后登录
- 2012-11-29
|
Discuz!X FOR SAE 伪静态的开启与使用,config.yaml配置教程
1. 编辑config.yaml
在SAE的SDK里进入论坛所在的应用,点右键,选择编辑config.yaml
rewrite代码规则如下:- #cron:
- # - description: cron test
- # url: index.php
- # schedule: every 43 mins
- # timezone: Beijing
- handle:
- -rewrite: if ( path ~"^topic-(.+)\.html$") goto"portal.php?mod=topic&topic=$1&%{QUERY_STRING}"
- -rewrite: if ( path ~"^article-([0-9]+)-([0-9]+)\.html$")goto "portal.php?mod=view&aid=$1&page=$2&%{QUERY_STRING}"
- -rewrite: if ( path ~"^forum-(\w+)-([0-9]+)\.html$") goto"forum.php?mod=forumdisplay&fid=$1&page=$2&%{QUERY_STRING}"
- -rewrite: if ( path ~"^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$") goto"forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2&%{QUERY_STRING}"
- -rewrite: if ( path ~"^group-([0-9]+)-([0-9]+)\.html$")goto "forum.php?mod=group&fid=$1&page=$2&%{QUERY_STRING}"
- -rewrite: if ( path ~"^space-(username|uid)-(.+)\.html$") goto"home.php?mod=space&$1=$2&%{QUERY_STRING}"
- -rewrite: if ( path ~"^archiver/(.+)\.html") goto"archiver/index.php?$1&%{QUERY_STRING}"
- -rewrite: if ( path ~ "^([a-z]+)-(.+)\.html$") goto"$1.php?rewrite=$2&%{QUERY_STRING}"
- -rewrite: if ( path ~ "^data/cache/(.+)\.css") goto"cssjs.php?file=$1&type=css"
- -rewrite: if ( path ~ "^data/cache/(.+)\.js") goto "cssjs.php?file=$1&type=js"
复制代码
config.yaml编辑完成后,保存并使用sdk上传
2. 后台开启伪静态
后台进入全局--》SEO设置
在url静态化页面里,勾选后面的开启保存即可 附演示http://cx125.sinaapp.com |
|