Hello,
I am new to nginx and I am having trouble converting htaccess rewrite to
nginx rewrite. Please help me convert the following mod_rewrites with a
brief explanation. And should I put the nginx rewrite back into the
.htaccess file or is there a designated config file to put the nginx
location blocks?
Options -MultiViews
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
Posted at Nginx Forum:
nngin
June 24, 2015, 9:31pm
2
searching the site, i found that this same question goes unanswered.
Please
point me in the right direction of where i would be able to get help.
Posted at Nginx Forum:
nngin
June 26, 2015, 1:11am
3
On Wed, Jun 24, 2015, 15:31 nngin [email protected] wrote:
searching the site, i found that this same question goes unanswered.
Please
point me in the right direction of where i would be able to get help.
Posted at Nginx Forum:
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx
Not quite familiar with apache rewrite rules, but I think you just need:
rewrite ^(.*)/$ $1 permanent;
try_files $uri /index.php;
Not tested, apologies if I’m wrong.