This is an automated email from the ASF dual-hosted git repository. martijnvisser pushed a commit to branch release-2.1 in repository https://gitbox.apache.org/repos/asf/flink.git
commit 1116983eeff6665927c35165533126c93c5f07f8 Author: Martijn Visser <[email protected]> AuthorDate: Wed Jan 21 08:44:08 2026 +0100 [FLINK-38924][docs] Actually redirect users to 404 page when trying to access non-existent page (cherry picked from commit 8f9a5a22e7f1a828606117c6959d5ddf0b280408) --- .github/workflows/docs.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/docs.sh b/.github/workflows/docs.sh index 6430f220aa2..26709a7c465 100755 --- a/.github/workflows/docs.sh +++ b/.github/workflows/docs.sh @@ -51,6 +51,16 @@ if [ $? -ne 0 ]; then exit 1 fi +# Generate .htaccess with dynamic 404 path based on branch +BRANCH=$(git branch --show-current) +cat > docs/target/.htaccess << EOF +# Ensure index.html is served for directory requests +DirectoryIndex index.html + +# Custom 404 error page +ErrorDocument 404 /flink/flink-docs-${BRANCH}/404.html +EOF + # build Flink; required for Javadoc step mvn clean install -B -DskipTests -Dfast -Dskip.npm -Pskip-webui-build
