From 0023f5f0204a4349ef560b4fe346d23ac2617847 Mon Sep 17 00:00:00 2001 From: Luffy <52o@qq52o.cn> Date: Tue, 13 May 2025 12:04:05 +0800 Subject: [PATCH 1/2] feat: add .htaccess for URL rewriting and custom 404 error handling --- static/.htaccess | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 static/.htaccess diff --git a/static/.htaccess b/static/.htaccess new file mode 100644 index 000000000..8da9c54e6 --- /dev/null +++ b/static/.htaccess @@ -0,0 +1,25 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +RewriteEngine On + +RewriteCond %{REQUEST_URI} ^/zh-CN/ +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^.*$ /zh-CN/404.html [L] + +ErrorDocument 404 /404.html From fb992ab872cb3b1b7aac104fdcc3c94ef902ea83 Mon Sep 17 00:00:00 2001 From: Luffy <52o@qq52o.cn> Date: Tue, 13 May 2025 13:08:12 +0800 Subject: [PATCH 2/2] chore: sync .asf.yaml --- static/.asf.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static/.asf.yaml b/static/.asf.yaml index e2a66517a..b835c4cb4 100644 --- a/static/.asf.yaml +++ b/static/.asf.yaml @@ -17,12 +17,12 @@ # NOTE: All configurations could be found here: https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features github: - description: "Answer official website." - homepage: https://answer.apache.org/ + description: "Apache Answer official website." + homepage: https://answer.apache.org enabled_merge_buttons: squash: true - merge: true - rebase: false + rebase: true + merge: false protected_branches: main: {} dist-pages: {}