Welcome! Log In Create A New Profile

Advanced

Re: Help do translate Apache Rewrite Rules

Edho Arief
November 18, 2012 07:02AM
On Sun, Nov 18, 2012 at 6:20 PM, Nielson Rolim <nielson.rolim@gmail.com> wrote:
> Hi,
>
> I'd like to ask for some help to translate these Apache Rules to Nginx:
>
> RewriteCond %{SCRIPT_FILENAME} !-f
> RewriteCond %{SCRIPT_FILENAME} !-d
> RewriteCond %{QUERY_STRING} (.*)
> RewriteRule ^(.*)$ index.php?url=$1&%1
>
>
> These rules redirects all the requests to index.php. For example:
>
> http://www.example.com/users/edit/id/1?profile=1
>
> Redirects to:
>
> http://www.example.com/index.php?url=users/edit/id/1&profile=1
>
> To be honest, I know what these rules do, but I don't know exactly how they
> work, so any help will be very appreciated.
>
>

try_files $uri $uri/ /index.php?url=$uri&$args;

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

Help do translate Apache Rewrite Rules

nielsonrolim November 18, 2012 06:22AM

Re: Help do translate Apache Rewrite Rules

Edho Arief November 18, 2012 07:02AM

Re: Help do translate Apache Rewrite Rules

nielsonrolim November 18, 2012 10:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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