the rewrite_log for Nginx
July 08, 2014 11:17PM
Hello, i have a web site working with Apache and based on mod_rewrite this code to be specific
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

# Removes index.php from ExpressionEngine URLs
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteCond %{REQUEST_URI} !/system/.* [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

# Directs all EE web requests through the site index file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
and i have found some website that help translate it to Nginx configuration

# nginx configuration
location ~* /system/.* {
}
location / {
rewrite (.*?)index\.php/*(.*) /$1$2 redirect;
if (!-e $request_filename){
rewrite ^(.*)$ /index.php/$1 break;
}
}

but i don't know to get it working or how to activate it because i want to migrate from Apache to Nginx i have been searching for 3 weeks but no good information i am hoping i can find help here.
Thanks
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 210
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready