You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2022/04/14 02:14:39 UTC
[dubbo-website] branch master updated: Try fix language redirect
This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-website.git
The following commit(s) were added to refs/heads/master by this push:
new 6664bcd42f Try fix language redirect
6664bcd42f is described below
commit 6664bcd42fd1fb44f2c2ad696f9853e619f51045
Author: Albumen Kevin <jh...@gmail.com>
AuthorDate: Thu Apr 14 10:14:33 2022 +0800
Try fix language redirect
---
.htaccess | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/.htaccess b/.htaccess
index 3ea417b45f..f36f1c020c 100644
--- a/.htaccess
+++ b/.htaccess
@@ -2,4 +2,11 @@
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
+
+# language starts with ZH
+RewriteCond %{HTTP:Accept-Language} ^zh [NC]
+RewriteRule ^$ /zh/ [L,R=301]
+
+# else redirect to the English version
+RewriteRule ^$ /en/ [L,R=301]
</IfModule>