Convert lighttpd rewrite rule to nginx

justin nginx-forum at nginx.us
Tue Jul 24 06:08:54 UTC 2012


Thanks for the tip on removing the if block. So, perhaps the regular
expression is off? Basically, the rewrite-rule should fire if the url
does NOT contain a period.

Examples:

     /some/path   //should hit the rewrite rule
     /file.php         //should NOT hit the rewrite rule

Here is php.conf as well:

location ~\.php {
  try_files $uri =404;
  fastcgi_index index.php;
  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  fastcgi_intercept_errors on;
  fastcgi_pass 127.0.0.1:9000;
  include /etc/nginx/fastcgi_params;
}

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,228909,228918#msg-228918



More information about the nginx mailing list