您的位置:首页 > 运维架构 > Nginx

How to enable Drupal Clean URL with Nginx

2011-01-18 11:46 387 查看
Install Drupal with Nginx, default, you can’t enable the Clean URL
function, you have to edit nginx.conf file and add the URL rewrite
rules.

If Drupal install in the root directory,

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


if drupal in a subdirectory,

if ($request_uri ~* ^.*/.*$) {
rewrite ^/(/w*)/(.*)$  /$1/index.php?q=$2 last;
break;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: