You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2020/11/12 08:05:21 UTC

[incubator-echarts-website] branch asf-site updated: add rewirte rule

This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-echarts-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new c621078  add rewirte rule
c621078 is described below

commit c621078a041d5a72fa5ef7729c668ef8d243b7bf
Author: 100pah <su...@gmail.com>
AuthorDate: Thu Nov 12 16:05:02 2020 +0800

    add rewirte rule
---
 .htaccess | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/.htaccess b/.htaccess
index 8ecbd37..fb5f8b3 100644
--- a/.htaccess
+++ b/.htaccess
@@ -18,3 +18,15 @@ Header set Access-Control-Allow-Headers: "*"
   ExpiresByType application/json          "access plus 1 hour"
   ExpiresDefault                          "access plus 10 days"
 </IfModule>
+
+
+RewriteEngine On
+
+RewriteCond "%{HTTP:Accept-Language}" "^zh" [NC]
+RewriteRule "^/$" "/zh/index.html"
+RewriteRule "^/index.html" "/zh/index.html" [L,R=301]
+
+RewriteCond "%{HTTP:Accept-Language}" "^en" [NC]
+RewriteRule "^/$" "/en/index.html"
+RewriteRule "^/index.html" "/en/index.html" [L,R=301]
+


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org