From 4084e6601fd52cb16e660a3c6c3ebc8609dab90c Mon Sep 17 00:00:00 2001 From: Trammell Hudson Date: Tue, 13 Dec 2022 19:53:40 +0000 Subject: [PATCH] nginx: redirect mastoon handles --- nginx/www.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nginx/www.conf b/nginx/www.conf index b062b67..eede5db 100644 --- a/nginx/www.conf +++ b/nginx/www.conf @@ -37,6 +37,11 @@ server { return 302 https://${KEYCLOAK_HOSTNAME}.${DOMAIN_NAME}$request_uri; } + # redirect mastodon handles (which start with @) directly to mastodon site + location ~ ^/@ { + return 302 https://${MASTODON_HOSTNAME}.${DOMAIN_NAME}$request_uri; + } + # tilde club home directories location ~ ^/~(.+?)(/.*)?$ { alias /home/$1/public_html$2;