Does anyone know how to rewrite this snippet?

## Execute PHP Scripts using FastCGI
location ~ \.php(/.*)? {
   if (!-e $request_filename) {
       rewrite / /index.php last;
   }

You can use try_files for that ( http://nginx.org/en/docs/http/ngx_http_core_module.html#try_files )

location ~ \.php$ {
   try_files $uri /index.php;
}


p.s. obviously for this location you need to add php handling also.

rr
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to