Drupal nginx重写规则

Drupal?nginx重写规则如下: 

server { ...location / { # This is cool because no php is touched for static content try_files $uri @rewrite; }location @rewrite { # Some modules enforce no slash (/) at the end of the URL # Else this rewrite block wouldn't be needed (GlobalRedirect) rewrite ^/(.*)$ /index.php?q=$1; }location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; fastcgi_pass unix:/tmp/phpfpm.sock; }... }

 重启nginx

Drupal nginx重写规则

相关文章:

你感兴趣的文章:

标签云: