![Drupal Nginx伪静态设置方法 Drupal Nginx伪静态设置方法](https://image.shishitao.com:8440/aHR0cHM6Ly9ia3FzaW1nLmlrYWZhbi5jb20vdXBsb2FkL2NoYXRncHQtcy5wbmc%2FIQ%3D%3D.png?!?w=700&webp=1)
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;
}
}