location ~ ^.*/files\/styles\/.*$ {
access_log off;
expires 45d;
error_page @drupal;
} location @drupal {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$ last;
}
}
# Drupal Rewrite
location / {
root /path/to/drupal;
index index.php index.html;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?q=$ last;
}
}