From 597e36904e8ccacc0af98463589805cb9ee910d2 Mon Sep 17 00:00:00 2001 From: alam00000 Date: Thu, 10 Sep 2026 13:42:57 +0530 Subject: [PATCH] feat: add URL redirection rules --- nginx.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/nginx.conf b/nginx.conf index fc0700aa..7afc77f0 100644 --- a/nginx.conf +++ b/nginx.conf @@ -43,6 +43,21 @@ http { return 301 /uk$1; } + if ($request_uri ~ ^/en/?(\?.*)?$) { + return 301 /$1; + } + if ($request_uri ~ ^/en/(.+)$) { + return 301 /$1; + } + + if ($request_uri ~ ^(/(?:ar|be|da|de|es|fr|id|it|ko|nl|pt|ru|sk|sv|tr|vi|zh|zh-TW|uk|ja))?/src/pages/([a-z0-9][a-z0-9-]*)\.html(\?.*)?$) { + return 301 $1/$2$3; + } + + if ($request_uri ~ ^(/(?:ar|be|da|de|es|fr|id|it|ko|nl|pt|ru|sk|sv|tr|vi|zh|zh-TW|uk|ja))?/change-text-color(?:\.html)?/?(\?.*)?$) { + return 301 $1/text-color$2; + } + if ($request_uri ~ ^/tools/$) { return 301 /tools; }