Skip to content

Commit

Permalink
Добавляет список редиректов
Browse files Browse the repository at this point in the history
  • Loading branch information
pepelsbey committed Jan 10, 2025
1 parent 2536c6d commit e471990
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit e471990

Please sign in to comment.