This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new a7cfd28744a [fix] fix 404 page (#3620)
a7cfd28744a is described below
commit a7cfd28744ac723ed4e5310267e88bf3a90a0dde
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Wed May 6 14:44:31 2026 -0700
[fix] fix 404 page (#3620)
---
static/.htaccess | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/static/.htaccess b/static/.htaccess
index ab5e0b02bec..2b98f7179eb 100644
--- a/static/.htaccess
+++ b/static/.htaccess
@@ -1,3 +1,18 @@
<IfModule mod_headers.c>
Header set Content-Security-Policy "script-src 'self'
https://cdnd.selectdb.com widget.kapa.ai www.google.com https://hcaptcha.com
https://*.hcaptcha.com https://www.gstatic.com 'unsafe-inline' 'unsafe-eval';
connect-src 'self' proxy.kapa.ai kapa-widget-proxy-la7dkmplpq-uc.a.run.app
metrics.kapa.ai https://hcaptcha.com https://*.hcaptcha.com www.google.com;
frame-src 'self' www.google.com https://hcaptcha.com https://*.hcaptcha.com;
worker-src 'self' https://cdnd.selectdb.com blob:; [...]
</IfModule>
+
+# Serve Docusaurus's built 404 page (which mounts src/theme/NotFound.js) for
any
+# unknown URL, instead of httpd's default ErrorDocument. The browser keeps the
+# original path, so NotFound.js can detect legacy /docs/dev/* and show
guidance.
+# For /zh-CN/* misses, rewrite to the zh-CN-locale 404 so the surrounding
Layout
+# (header/footer/i18n context) renders in Chinese; the URL is preserved so the
+# React component still reads the original pathname for legacy detection.
+<IfModule mod_rewrite.c>
+ RewriteEngine On
+ RewriteCond %{REQUEST_URI} ^/zh-CN/
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteRule ^ /zh-CN/404.html [L]
+</IfModule>
+ErrorDocument 404 /404.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]