I have a woocommerce site that runs a script for accounts that has stopped working after moving from Apache to Nginx.
example.com/zynk/index.php/wp_posts?select=ID,meta_value&where=post_type....
The script gets the parameters using
$urlParts = explode('/', $_SERVER['PATH_INFO']);
This now returns a 404 on Nginx.
I think the following .htaccess
rules allowed this script to fire on Apache:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
But I can't get this working on Nginx.
I've tried:
location /zynk {
index index.php;
try_files $uri $uri/ /index.php$request_uri?;
}
However, this does not seem to work.
I could be barking up the wrong tree? or do I just have the rewrite rules wrong?