From d00917a4246447e51a189fb7bbd504f09ccc2b71 Mon Sep 17 00:00:00 2001 From: Kai Hendry Date: Fri, 2 Oct 2015 14:33:55 +0800 Subject: [PATCH] Redirect to fetch if there is an issue --- nginx.conf | 3 ++- www/404.php | 11 +++++++++++ robots.txt => www/robots.txt | 0 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 www/404.php rename robots.txt => www/robots.txt (100%) diff --git a/nginx.conf b/nginx.conf index c934895..2bfa54c 100644 --- a/nginx.conf +++ b/nginx.conf @@ -19,13 +19,14 @@ http { charset utf-8; access_log /srv/http/u/greptweet.access.log; error_log /srv/http/u/greptweet.error.log; + error_page 404 403 =303 /404.php; location / { index index.php index.html; rewrite ^/f/(.*)$ /create.php?id=$1 last; } - location ~ \.(svg|txt)$ { + location ~ \.(txt)$ { add_header Content-Encoding gzip; gzip off; } diff --git a/www/404.php b/www/404.php new file mode 100644 index 0000000..20f8caa --- /dev/null +++ b/www/404.php @@ -0,0 +1,11 @@ + + +

Error

diff --git a/robots.txt b/www/robots.txt similarity index 100% rename from robots.txt rename to www/robots.txt