Convert lighttpd rewrite rule to nginx

justin nginx-forum at
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.


     /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;
  include /etc/nginx/fastcgi_params;

Posted at Nginx Forum:,228909,228918#msg-228918

More information about the nginx mailing list