I've started working on a new RESTful API using the Tonic Framework. I already have functioning code that I've tested over my apache box, but I'm now trying to move it to my Nginx machine.
I've tried converting this to nginx rules:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !router\.php$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* router.php [L,QSA]
</IfModule>
But none of my rules seem to work.
What i've tried so far is Trying to redirect all requests to /v2/router.php (the php file im trying to get to)
location /v2/ {
try_files $uri $uri/ /v2/router.php;
}
This causes weird results such as all of my php files executing for some weird reason, etc...
Would appreciate your support on this.