Welcome! Log In Create A New Profile

Advanced

Convert Apache .htaccess rewrite to nginx

June 23, 2015 11:21AM
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?

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>

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]
</IfModule>
Subject Author Posted

Convert Apache .htaccess rewrite to nginx

nngin June 23, 2015 11:21AM

Re: Convert Apache .htaccess rewrite to nginx

nngin June 24, 2015 03:31PM

Re: Convert Apache .htaccess rewrite to nginx

ryd994 June 25, 2015 07:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 300
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready