Jun 302010
 

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;
}