Help do translate Apache Rewrite Rules

Nielson Rolim nielson.rolim at gmail.com
Sun Nov 18 15:04:05 UTC 2012


Thank you Edho!

On Sun, Nov 18, 2012 at 9:00 AM, Edho Arief <edho at myconan.net> wrote:

> On Sun, Nov 18, 2012 at 6:20 PM, Nielson Rolim <nielson.rolim at 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 at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



-- 
Nielson Rolim
nielson.rolim at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20121118/f186ab49/attachment.html>


More information about the nginx mailing list