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

martijnvisser pushed a commit to branch release-1.18
in repository https://gitbox.apache.org/repos/asf/flink.git

commit d3ab9bfa664775b6df2ed74dd2aed9b75f3af8ee
Author: Martijn Visser <[email protected]>
AuthorDate: Mon Jan 19 15:42:22 2026 +0100

    [hotfix][docs] Add .htaccess to serve custom 404 page
    
    Configures Apache to serve the version-specific 404.html when
    a page is not found, using mod_rewrite to dynamically determine the docs 
version from the request URI.
---
 docs/static/.htaccess | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/docs/static/.htaccess b/docs/static/.htaccess
new file mode 100644
index 00000000000..2bf1f0aa43d
--- /dev/null
+++ b/docs/static/.htaccess
@@ -0,0 +1,24 @@
+# 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.
+
+# Custom 404 error page
+# Dynamically serve 404.html from the same docs version
+RewriteEngine On
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteCond %{REQUEST_URI} ^(/flink/flink-docs-[^/]+)/
+RewriteRule ^ %1/404.html [L]

Reply via email to