I'm moving a PHP application from Apache to Nginx, using php-fpm. I'm almost done, except by a rewrite directive that I haven't been able to do in Nginx. The following is the excerpt from the Apache config that I need to port:
# Handle alianza.quehambre.cl RewriteCond %{HTTP_HOST} ^alianza\.quehambre\.cl [NC] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-l RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !(api|get)/(.*) RewriteRule ^(.*)$ /index.php/get/$1 [L,QSA] The full Nginx configuration is in this gist, including my current non-working attempt to write the above rules.