diff --git a/nginx.conf b/nginx.conf index 5f01426c..1110f3f6 100644 --- a/nginx.conf +++ b/nginx.conf @@ -20,6 +20,10 @@ server { include snippets/ssl-params.conf; } +map $uri $redirect { + /tag/html5doctor/ /articles/tags/html/; +} + server { listen 443 ssl http2; listen [::]:443 ssl http2; @@ -34,6 +38,12 @@ server { root /var/www/web-standards.ru; } + location / { + if ($redirect) { + return 301 $redirect; + } + } + ssl_certificate /etc/letsencrypt/live/web-standards.ru/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/web-standards.ru/privkey.pem; ssl_trusted_certificate /etc/letsencrypt/live/web-standards.ru/chain.pem;