Hello,
I use this rewrite rules (rules not isolated in my vhosts declaration) to rewrite .jpg files with a distant server.
location ~ /(.*).jpg$ {
rewrite ^/pict/(.*).jpg$ /images/$1.jpg last;
proxy_pass http://distante-server.com;
}
This rules works perfectly but impact to the statics .jpf files presents in the server (404 reply).
I would like to isolated this rules in a specific folder (example in "pict" folder), after multi tests I can't do it, if someone have the solution.
like this :
location ~ /pict/(.*).jpg$ {
rewrite ^/pict/(.*).jpg$ /images/$1.jpg last;
proxy_pass http://distante-server.com;
}
Thank you for your help :)
I use this rewrite rules (rules not isolated in my vhosts declaration) to rewrite .jpg files with a distant server.
location ~ /(.*).jpg$ {
rewrite ^/pict/(.*).jpg$ /images/$1.jpg last;
proxy_pass http://distante-server.com;
}
This rules works perfectly but impact to the statics .jpf files presents in the server (404 reply).
I would like to isolated this rules in a specific folder (example in "pict" folder), after multi tests I can't do it, if someone have the solution.
like this :
location ~ /pict/(.*).jpg$ {
rewrite ^/pict/(.*).jpg$ /images/$1.jpg last;
proxy_pass http://distante-server.com;
}
Thank you for your help :)