|
86 | 86 | } |
87 | 87 | </script> |
88 | 88 | <script> |
89 | | - if (window.location.pathname == "/fr/ru" || window.location.pathname == "/ua/ru" || window.location.pathname == "/bn/ru") { |
90 | | - window.location.href = "/ru" |
91 | | - } else if (window.location.pathname == "/ru/fr" || window.location.pathname == "/ua/fr" || window.location.pathname == "/bn/fr") { |
92 | | - window.location.href = "/fr" |
93 | | - } else if (window.location.pathname == "/ru/ua" || window.location.pathname == "/fr/ua" || window.location.pathname == "/bn/ua") { |
94 | | - window.location.href = "/ua" |
95 | | - } else if (window.location.pathname == "/ru/bn" || window.location.pathname == "/fr/bn" || window.location.pathname == "/ua/bn") { |
96 | | - window.location.href = "/bn" |
97 | | - } else if (window.location.pathname == "/ru/en/docs" || window.location.pathname == "/fr/en/docs" || window.location.pathname == "/ua/en/docs" || window.location.pathname == "/bn/en/docs") { |
98 | | - window.location.href = "/en/docs" |
99 | | - } else if (window.location.pathname == "/ru/ru/docs" || window.location.pathname == "/fr/ru/docs" || window.location.pathname == "/ua/ru/docs" || window.location.pathname == "/bn/ru/docs") { |
100 | | - window.location.href = "/ru/docs" |
101 | | - } else if (window.location.pathname == "/fr/fr/docs" || window.location.pathname == "/ru/fr/docs" || window.location.pathname == "/ua/fr/docs" || window.location.pathname == "/bn/fr/docs") { |
102 | | - window.location.href = "/fr/docs" |
103 | | - } else if (window.location.pathname == "/ua/ua/docs" || window.location.pathname == "/fr/ua/docs" || window.location.pathname == "/ru/ua/docs" || window.location.pathname == "/bn/ua/docs") { |
104 | | - window.location.href = "/ua/docs" |
105 | | - } else if (window.location.pathname == "/bn/bn/docs" || window.location.pathname == "/fr/bn/docs" || window.location.pathname == "/ru/bn/docs" || window.location.pathname == "/ua/bn/docs") { |
106 | | - window.location.href = "/bn/docs" |
107 | | - } else { |
108 | | - window.location.href = "/" |
109 | | - } |
| 89 | + const redirectMap = { |
| 90 | + "/fr/ru": "/ru", "/ua/ru": "/ru", "/bn/ru": "/ru", |
| 91 | + "/ru/fr": "/fr", "/ua/fr": "/fr", "/bn/fr": "/fr", |
| 92 | + "/ru/ua": "/ua", "/fr/ua": "/ua", "/bn/ua": "/ua", |
| 93 | + "/ru/bn": "/bn", "/fr/bn": "/bn", "/ua/bn": "/bn", |
| 94 | + "/ru/en/docs": "/en/docs", "/fr/en/docs": "/en/docs", "/ua/en/docs": "/en/docs", "/bn/en/docs": "/en/docs", |
| 95 | + "/ru/ru/docs": "/ru/docs", "/fr/ru/docs": "/ru/docs", "/ua/ru/docs": "/ru/docs", "/bn/ru/docs": "/ru/docs", |
| 96 | + "/fr/fr/docs": "/fr/docs", "/ru/fr/docs": "/fr/docs", "/ua/fr/docs": "/fr/docs", "/bn/fr/docs": "/fr/docs", |
| 97 | + "/ua/ua/docs": "/ua/docs", "/fr/ua/docs": "/ua/docs", "/ru/ua/docs": "/ua/docs", "/bn/ua/docs": "/ua/docs", |
| 98 | + "/bn/bn/docs": "/bn/docs", "/fr/bn/docs": "/bn/docs", "/ru/bn/docs": "/bn/docs", "/ua/bn/docs": "/bn/docs" |
| 99 | + }; |
| 100 | + const currentPath = window.location.pathname; |
| 101 | + const redirectPath = redirectMap[currentPath] || "/"; |
| 102 | + window.location.href = redirectPath; |
110 | 103 | </script> |
111 | 104 | </head> |
112 | 105 | <body> |
|
0 commit comments