Rewrite question
Ilan Berkner
iberkner at gmail.com
Thu Jun 3 20:00:08 MSD 2010
Maybe try to put the /medias/ location on top?
On Thu, Jun 3, 2010 at 11:50 AM, Axel <junk at 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 at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20100603/f4337e41/attachment.html>
More information about the nginx
mailing list