
原帖由 shinko 于 2010-5-5 19:11 发表
我的安装包里面的wp super cache的rewrite规则是
location /
{
autoindex off;
gzip_static on;
set $wp_super_cache_file '';
...
type的飘过~location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css)$
{
expires 30d;
}
location /
{
autoindex off;
set $wp_super_cache_file '';
set $wp_super_cache_uri $request_uri;
if ( $request_method = POST )
{
set $wp_super_cache_uri '';
}
if ( $query_string )
{
set $wp_super_cache_uri '';
}
if ( $http_cookie ~* "comment_author_|WordPress|wp-postpass_" )
{
set $wp_super_cache_uri '';
}
if ( $wp_super_cache_uri ~ ^(.+)$ )
{
set $wp_super_cache_file /wp-content/cache/supercache/$http_host/$1index.html;
}
if ( -f $document_root$wp_super_cache_file )
{
rewrite ^(.*)$ $wp_super_cache_file break;
}
if (-f $request_filename)
{
expires 30d;
break;
}
if (!-e $request_filename)
{
rewrite ^(.+)$ /index.php last;
}
}
| 欢迎光临 全球主机交流论坛 (https://lilynana.eu.org/) | Powered by Discuz! X3.4 |