My script is hosted on centos 7 apache server, with below htaccess:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
Now we have migrated the script to a ubuntu 20 server, with nginx webservice. The nginx conf has the following settings:
rewrite ^/(.*.php)(/)(.*)$ /$1?file=/$3 last;
try_files $uri $uri/ /index.php?$args;
index index.php index.html;
However this does not work for my script.
How can I rewrite this htaccess information for nginx conf instead?
Any help is much appreciated.