feat: add URL redirection rules

This commit is contained in:
alam00000
2026-09-10 13:43:15 +05:30
parent e01f80867b
commit 597e36904e
+15
View File
@@ -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;
}