appconfig中的URL重写和页面压缩设置失效了么?

47 views
Skip to first unread message

马思奇

unread,
Nov 7, 2012, 3:55:39 AM11/7/12
to sae-p...@googlegroups.com
配了这些:
handle:
- expire: if( path ~ "/media" ) time 864000
- expire: if( path ~ "media/ico/favicon.ico" ) time 8640000
- compress: if ( out_header["Content-type"]=="application/json" ) compress
- compress: if ( out_header["Content-type"]=="text/html" ) compress
- compress: if ( out_header["Content-Length"]>=4096 ) compress
- rewrite:  if ( !is_dir() && !is_file() && path ~ "favicon.ico" ) goto "media/ico/favicon.ico"
- rewrite:  if ( !is_dir() && !is_file() && path ~ "/robots.txt" ) goto "/static/robots.txt"
- rewrite:  if ( !is_dir() && !is_file() && path ~ "/weblukerverif.html" ) goto "/static/weblukerverif.html"
- rewrite:  if ( !is_dir() && !is_file() && path ~ "/googleca5f2e917b27f580.html" ) goto "/static/googleca5f2e917b27f580.html"
- rewrite:  if ( !is_dir() && !is_file() && path ~ "/bdsitemap.txt" ) goto "/static/bdsitemap.txt"


之前是正常的,不知道从什么时候开始不起作用了...

Alan Chan

unread,
Nov 7, 2012, 4:00:28 AM11/7/12
to sae-p...@googlegroups.com
python runtime的config.yaml配置参见:

http://appstack.sinaapp.com/static/doc/release/testing/runtime.html#id4

rewrite不支持,压缩目前不支持。

--
邮件来自: SAE Python 邮件列表
发言: sae-p...@googlegroups.com
退订: sae-python+...@googlegroups.com (向此发空信即退!)
 
 

ma siqi

unread,
Nov 7, 2012, 4:01:54 AM11/7/12
to sae-p...@googlegroups.com
大概2~3个月之前是支持的啊,后来为什么取消了?什么时候支持?

Shuai Lin

unread,
Nov 7, 2012, 4:04:51 AM11/7/12
to sae-p...@googlegroups.com
如果用 django,压缩可以加一个 'django.middleware.gzip.GZipMiddleware' 就能解决。其他的框架应该也不难



2012/11/7 ma siqi <mas...@gmail.com>

Alan Chan

unread,
Nov 7, 2012, 4:12:00 AM11/7/12
to sae-p...@googlegroups.com
rewrite不会支持,python基本用不到这个。

页面压缩最近正在考虑加上。

2012/11/7 ma siqi <mas...@gmail.com>

ma siqi

unread,
Nov 7, 2012, 4:15:15 AM11/7/12
to sae-p...@googlegroups.com
rank会支持么?

ma siqi

unread,
Nov 7, 2012, 4:15:57 AM11/7/12
to sae-p...@googlegroups.com
不合理啊,JS或者CSS怎么办?也用django处理一遍

Shuai Lin

unread,
Nov 7, 2012, 4:20:30 AM11/7/12
to sae-p...@googlegroups.com
确实是个问题。用 django 来处理静态文件不太好。不过一般 js 和 css 都只下载一次,以后都是 304 Not modified 了吧。


2012/11/7 ma siqi <mas...@gmail.com>

Alan Chan

unread,
Nov 7, 2012, 4:25:57 AM11/7/12
to sae-p...@googlegroups.com

2012/11/7 ma siqi <mas...@gmail.com>
rank会支持么?

 不会。

gue

unread,
Nov 7, 2012, 8:05:47 PM11/7/12
to sae-p...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages