From ba3ff85aaba86be41da66927a1d5e6d07e412db8 Mon Sep 17 00:00:00 2001 From: Stefan Imhoff Date: Sat, 6 Apr 2024 14:43:28 +0200 Subject: [PATCH] chore: add redirect rules for ngnix --- nginx.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nginx.conf b/nginx.conf index 0f6698f..30d1ea7 100644 --- a/nginx.conf +++ b/nginx.conf @@ -23,6 +23,17 @@ server { add_header cache-control "max-age=0, no-cache, no-store, must-revalidate"; } + # Redirect domain aliases to primary domain + if ($host ~* "^www.imhoff.name$") { + return 301 https://www.stefanimhoff.de$request_uri; + } + if ($host ~* "^stefan.imhoff.name$") { + return 301 https://www.stefanimhoff.de$request_uri; + } + if ($host ~* "^imhoff.name$") { + return 301 https://www.stefanimhoff.de$request_uri; + } + # Redirects rewrite ^/feed-raindrop.xml$ https://bg.raindrop.io/rss/public/25041238 permanent; rewrite ^/index.xml$ /rss.xml permanent;