From 796a2fcde86972acbc05e57995833e2fb1963053 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Mon, 28 Mar 2016 23:56:34 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=B7=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=BF=D0=BB=D0=B0=D1=89=D0=B5=D0=B9,=20=D0=B5=D1=81=D0=BB?= =?UTF-8?q?=D0=B8=20=D0=B5=D1=81=D1=82=D1=8C=20=D0=BE=D0=B4=D0=BD=D0=BE?= =?UTF-8?q?=D0=B8=D0=BC=D1=91=D0=BD=D0=BD=D1=8B=D0=B9=20=D1=84=D0=B0=D0=B9?= =?UTF-8?q?=D0=BB=20=D0=B2=20=D0=B4=D0=B8=D1=80=D0=B5=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cloaks/.gitignore | 2 ++ nginx.conf | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 cloaks/.gitignore diff --git a/cloaks/.gitignore b/cloaks/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/cloaks/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/nginx.conf b/nginx.conf index 5622fe8..2073d57 100644 --- a/nginx.conf +++ b/nginx.conf @@ -16,8 +16,11 @@ location /minecraft.php { } location /cloaks/ { - rewrite ^/cloaks/(.*)$ http://skins.minecraft.net/MinecraftCloaks/$1.png? permanent; - return 404; + try_files $uri $uri.png @cloaks; +} + +location @cloaks { + rewrite ^/cloaks/(.+?)(\.[^.]*$|$)$ http://skins.minecraft.net/MinecraftCloaks/$1.png? permanent; } location ~* ^/skins/$ { @@ -34,4 +37,4 @@ location ~* ^/cloaks/$ { } rewrite .* /cloaks/$arg_name permanent; -} \ No newline at end of file +}