Welcome! Log In Create A New Profile

Advanced

Rewrite conversion

July 23, 2011 03:08AM
Hello,

I'm trying to convert from apache to nginx rewrite.

ErrorDocument 403 /index.php?do=/public/error/403/
ErrorDocument 404 /index.php?do=/public/error/404/

RewriteEngine On

RewriteCond %{REQUEST_URI} !^/file/.*
RewriteCond %{REQUEST_URI} !^/install/.*
RewriteCond %{REQUEST_URI} !^/design/.*
RewriteCond %{REQUEST_URI} !^/plugins/.*
RewriteRule ^index.php(/.*)$ /index.php?do=$1 [L]

RewriteCond %{REQUEST_URI} !^/file/.*
RewriteCond %{REQUEST_URI} !^/install/.*
RewriteCond %{REQUEST_URI} !^/design/.*
RewriteCond %{REQUEST_URI} !^/plugins/.*
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} !^/robots.txt
RewriteCond %{REQUEST_URI} !^/favicon.ico
RewriteRule ^(.*)$ /index.php?do=/$1 [L]


This is my try :D

error_page 403 /index.php?do=/public/error/403/;
error_page 404 /index.php?do=/public/error/404/;

rewrite ^index.php(/.*)$ /index.php?do=$1 last;
rewrite ^(.*)$ /index.php?do=/$1 last;

I have difficulty on REQUEST_URI with following paths.

any help is appreciated.

Thank you.
Tseveen.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Rewrite conversion

Eberx July 23, 2011 03:08AM

Re: Rewrite conversion

Igor Sysoev July 23, 2011 03:20AM

Re: Rewrite conversion

Eberx July 23, 2011 03:32AM

Re: Rewrite conversion

Eberx July 23, 2011 06:56AM

Re: Rewrite conversion

Eberx July 23, 2011 10:36AM

Re: Rewrite conversion

Edho Arief July 23, 2011 11:08AM

Re: Rewrite conversion

Eberx July 24, 2011 09:12PM

Re: Rewrite conversion

Eberx November 11, 2011 08:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 208
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