不常用的字符不在Nginx中加载Drupal Boost静态caching

(安装程序:Drupal 6.20,Boost 1.18,Nginx 0.7.67)

当增强节点的URL包含字符中国新闻网新闻中心 ,节点正确caching在caching目录中,正确反映URL。

但是在访问节点时,取而代之的是未加载的节点。

以下是我使用的Nginx规则:

 server { server_name *.com *.net *.org; location / { root /var/www/html/$host; index index.php; set $boost ""; set $boost_query "_"; if ( $request_method = GET ) { set $boost G; } if ($http_cookie !~ "DRUPAL_UID") { set $boost "${boost}D"; } if ($query_string = "") { set $boost "${boost}Q"; } if ( -f $document_root/cache/normal/$host$request_uri$boost_query.html ) { set $boost "${boost}F"; } if ($boost = GDQF){ rewrite ^.*$ /cache/normal/$host/$request_uri$boost_query.html break; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?q=$1 last; break; } } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/html/$host$fastcgi_script_name; include fastcgi_params; } } 

我已经尝试添加charset utf-8;http {server { 。 他们两个都不行。

尝试在您的ifs中使用$ uri而不是$ request_uri。 $ request_uri是未处理的,所以%编码的实体仍然是编码的。 $ uri已被解码,这可能是你需要的。