[tor-commits] [tpo/master] add .htaccess rules to be able to forward Tor Browser locales. closes: https://gitlab.torproject.org/tpo/web/tpo/-/issues/95

emmapeel at torproject.org emmapeel at torproject.org
Tue Mar 2 19:30:42 UTC 2021


commit 85955d5ccc8fbcf50c89de2d513ec7900bd3185b
Author: emma peel <emma.peel at riseup.net>
Date:   Tue Mar 2 20:30:17 2021 +0100

    add .htaccess rules to be able to forward Tor Browser locales. closes: https://gitlab.torproject.org/tpo/web/tpo/-/issues/95
---
 .htaccess | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/.htaccess b/.htaccess
index a6af184b..485a7f27 100644
--- a/.htaccess
+++ b/.htaccess
@@ -192,3 +192,20 @@ RewriteRule ^donate/donate-usetor-md-lc(.*) https://donate.torproject.org/ [R=30
 RewriteRule ^donate/donate-usetor-em-lc(.*) https://donate.torproject.org/ [R=302,L]
 RewriteRule ^donate/donate-usetor-tn-lc(.*) https://donate.torproject.org/ [R=302,L]
 #
+# Redirects for languages still not translated, and other language situations
+# forward requests in /en to the root folder
+RewriteRule ^(en-US|en)$ / [R=302,L]
+RewriteRule ^(en-US|en)/(.*) /$2 [R=302,L]
+#
+# forward requests in /en and /en-US to the root folder
+RewriteRule ^(en|en-US)$ / [R=302,L]
+RewriteRule ^(en|en-US)/(.*) /$2 [R=302,L]
+#
+# Rewrites for languages that have a different mapping in the page than in TBB
+RewriteRule ^(es-ES|es-MX|es-CO|es-AR)(.*) /es$2 [R=302,L]
+#
+# Rewrites for languages that have a Tor Browser release
+# but don't have a community page
+# You can see them at https://dist.torproject.org/torbrowser/, pick the last alpha for the most languages
+# this languages are the translation priority for the website!
+RewriteRule ^(ar|bn|bn-BD|bn-IN|ga|ga-IE|cs|da|el|fa|ga|he|hu|id|ja|ko|lt|mk|ms|nb-NO|nl|pl|pt-PT|ro|sv-SE|th|vi|zh-TW)/(.*) /$2 [R=302,L]



More information about the tor-commits mailing list