在 NGINX 中重写结果
Rewrite Results in NGINX
在CentOS环境下编写的RewriteRule
即使转换后也无法在NGINX环境下使用。
谁能指导我,在 NGINX 环境中 Drupal 重写规则需要遵循什么语法?
对于 URL 在 Drupal 中重写,请将以下内容放入 server
部分的 location /
部分的 nginx vhost 配置中:
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q= last;
break;
}
在CentOS环境下编写的RewriteRule
即使转换后也无法在NGINX环境下使用。
谁能指导我,在 NGINX 环境中 Drupal 重写规则需要遵循什么语法?
对于 URL 在 Drupal 中重写,请将以下内容放入 server
部分的 location /
部分的 nginx vhost 配置中:
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q= last;
break;
}