Re: Redirect в случае если файл присутствует

siroco nginx-forum на forum.nginx.org
Пн Апр 18 10:33:11 UTC 2016


Спасибо!

Сделал так, все работает как надо:

      location /some-location {

                # where we store sha256 sums
                root /var/www/sha256sums;

                # we are checking files plus ".sha256" extentions
                set $filetocheck $uri.sha256;

                set $cdn_server_name   our-cdn.domain.com;

                if (!-f $document_root$filetocheck) { return 404; break; }

                return      302     http://$cdn_server_name$request_uri;

        }

Posted at Nginx Forum: https://forum.nginx.org/read.php?21,266212,266215#msg-266215



Подробная информация о списке рассылки nginx-ru