Drupal Nginx伪静态设置方法

location ~ ^.*/files\/styles\/.*$ {
        access_log off;
        expires 45d;
        error_page 404 @drupal;
}

location @drupal {
        if (!-e $request_filename) {
        rewrite ^/(.*)$ /index.php?q=$1 last;
        }
}
# Drupal Rewrite
location / {
        root /path/to/drupal;
        index index.php index.html;
        if (!-e $request_filename) {
                rewrite ^(.*)$ /index.php?q=$1 last;
        }
}

 

posted @ 2014-06-24 14:35  为了这有限的生命  阅读(1593)  评论(0编辑  收藏  举报