Welcome! Log In Create A New Profile

Advanced

Re: Rewrite question

June 03, 2010 12:04PM
Maybe try to put the /medias/ location on top?

On Thu, Jun 3, 2010 at 11:50 AM, Axel <junk@devignon.fr> wrote:

> Hi guys,
>
> stupid but tricky question. In my "server" configuration, I added two
> "location" directives:
>
> location ~* \.css|\.js|\.jpg|\.jpeg|\.png|\.gif|\.swf|\.svg|\.tiff$ {
> expires 30d;
> }
>
> location /medias/ {
> rewrite ^/medias/(.*) http://static.mydomain.com/$1 permanent;
> }
>
> The rewrite works fine except for jpg files. I suppose there is a conflict
> between the two locations. It works if I comment out the first location. I
> tried to invert locations or to add a "break;" after the rewrite command or
> to replace "permanent" with "last" or "break". Nothing does the trick.
>
> If you have any idea, that would be great.
>
> Tks
>
> Axel
>
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Rewrite question

Axel June 03, 2010 11:56AM

Re: Rewrite question

iberkner June 03, 2010 12:04PM

Re: Rewrite question

Maxim Dounin June 03, 2010 12:18PM

Re: Rewrite question

Axel June 03, 2010 12:20PM

Re: rewrite question

Richard Stanway via nginx June 11, 2018 06:02AM

Re: rewrite question

Francis Daly June 11, 2018 11:08AM

Re: rewrite question

Richard Stanway via nginx June 11, 2018 11:40AM

Re: rewrite question

shiz June 12, 2018 06:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 80
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready