forked from apache/dubbo-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
37 lines (28 loc) · 1.19 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# no cahce for root index redirection
<If "%{REQUEST_URI} =~ m#^/?([\w\-]+\.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>
</If>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond "%{HTTP:Accept-Language}" ^zh
RewriteCond %{HTTP_HOST} !cn
RewriteCond %{HTTP_HOST} !static
RewriteRule ^(.*)$ https://cn.dubbo.apache.org/$1 [L,R=301]
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTP_HOST} !static
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond "%{HTTP:Accept-Language}" ^zh [NC]
RewriteRule ^/?(index\.html)?$ "/zh-cn/index.html" [L,R=301]
RewriteRule ^/?(index\.html)?$ "/en/index.html" [L,R=301]
RewriteCond "%{HTTP:Accept-Language}" ^zh [NC]
RewriteRule ^/?faq/?([\w\-/]+)?$ "/zh-cn/overview/mannual/java-sdk/faq/$1" [L,R=301]
RewriteRule ^/?faq/?([\w\-/]+)?$ "/en/docs3-v2/java-sdk/faq/$1" [L,R=301]
RewriteRule ^/?zh/([\s\S]*)?$ "/zh-cn/$1" [L,R=301]
</IfModule>