Nginx

Nginx 私有文件重定向

location ^~ /system/files/ {
  rewrite ^ /index.php;
}

标签: 

Nginx 配置 Boost

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;
  }

标签: 

Nginx Drupal Rewrite Rules

if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
}

标签: