You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/09/21 07:39:06 UTC
[echarts-website] branch asf-site updated: redirect html in root
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/echarts-website.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 925d252 redirect html in root
925d252 is described below
commit 925d252190fc88f4228051d5762374821c3f9c1d
Author: pissang <bm...@gmail.com>
AuthorDate: Tue Sep 21 15:38:55 2021 +0800
redirect html in root
---
.htaccess | 64 +++++++++++++++++++++++++++++++++++----------------------------
1 file changed, 36 insertions(+), 28 deletions(-)
diff --git a/.htaccess b/.htaccess
index 3764cfc..03e0c74 100644
--- a/.htaccess
+++ b/.htaccess
@@ -8,47 +8,55 @@ RedirectMatch 404 /\.github
RedirectMatch 404 /\.asf\.yaml
<IfModule mod_headers.c>
- Header set Access-Control-Allow-Origin: https://echarts.apache.org
- Header set Access-Control-Allow-Methods "*"
- Header set Access-Control-Allow-Headers "*"
+ Header set Access-Control-Allow-Origin: https://echarts.apache.org
+ Header set Access-Control-Allow-Methods "*"
+ Header set Access-Control-Allow-Headers "*"
</IfModule>
<IfModule mod_expires.c>
- ExpiresActive on
-
- ExpiresByType text/html "access plus 1 hour"
- ExpiresByType image/png "access plus 1 hour"
- ExpiresByType image/jpg "access plus 1 hour"
- ExpiresByType image/jpeg "access plus 1 hour"
- ExpiresByType text/css "access plus 1 hour"
- ExpiresByType application/javascript "access plus 1 hour"
- ExpiresByType application/json "access plus 1 hour"
- ExpiresDefault "access plus 10 days"
+ ExpiresActive on
+
+ ExpiresByType text/html "access plus 1 hour"
+ ExpiresByType image/png "access plus 1 hour"
+ ExpiresByType image/jpg "access plus 1 hour"
+ ExpiresByType image/jpeg "access plus 1 hour"
+ ExpiresByType text/css "access plus 1 hour"
+ ExpiresByType application/javascript "access plus 1 hour"
+ ExpiresByType application/json "access plus 1 hour"
+ ExpiresDefault "access plus 10 days"
</IfModule>
# no cahce for index redirection
<If "%{REQUEST_URI} =~ m#^/(index\.html)?$#">
- <IfModule mod_expires.c>
- ExpiresActive off
- </IfModule>
-
- <IfModule mod_headers.c>
- Header always set Cache-Control "no-store, no-cache, must-revalidate"
- Header always set Expires "Thu, 01 Dec 1994 16:00:00 GMT"
- Header always merge Vary "Accept-Language"
- </IfModule>
+ <IfModule mod_expires.c>
+ ExpiresActive off
+ </IfModule>
+
+ <IfModule mod_headers.c>
+ Header always set Cache-Control "no-store, no-cache, must-revalidate"
+ Header always set Expires "Thu, 01 Dec 1994 16:00:00 GMT"
+ Header always merge Vary "Accept-Language"
+ </IfModule>
</If>
<IfModule mod_rewrite.c>
- RewriteEngine On
+ RewriteEngine On
- RewriteCond "%{HTTP:Accept-Language}" ^zh [NC]
- RewriteRule ^/?(index[.]html)?$ "/zh/index.html" [L,R=302]
+ RewriteCond "%{HTTP:Accept-Language}" ^zh [NC]
+ RewriteRule ^/?(index[.]html)?$ "/zh/index.html" [L,R=302]
- RewriteCond "%{HTTP:Accept-Language}" ^en [NC]
- RewriteRule ^/?(index[.]html)?$ "/en/index.html" [L,R=302]
+ RewriteCond "%{HTTP:Accept-Language}" ^en [NC]
+ RewriteRule ^/?(index[.]html)?$ "/en/index.html" [L,R=302]
- RewriteRule ^/?(index[.]html)?$ "/en/index.html" [L,R=302]
+ RewriteRule ^/?(index[.]html)?$ "/en/index.html" [L,R=302]
+
+ RewriteCond "%{HTTP:Accept-Language}" ^zh [NC]
+ RewriteRule ^/?([a-zA-Z0-9\_\-])+[.]html$ "/zh/$1.html" [L,R=302]
+
+ RewriteCond "%{HTTP:Accept-Language}" ^en [NC]
+ RewriteRule ^/?([a-zA-Z0-9\_\-])+[.]html$ "/en/$1.html" [L,R=302]
+
+ RewriteRule ^/?([a-zA-Z0-9\_\-])+[.]html$ "/en/$1.html" [L,R=302]
</IfModule>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org