Skip to content

fix: deploy .htaccess and add HTML redirect fallbacks#686

Merged
skrawcz merged 1 commit intoapache:mainfrom
andreahlert:fix/htaccess-deploy
Mar 19, 2026
Merged

fix: deploy .htaccess and add HTML redirect fallbacks#686
skrawcz merged 1 commit intoapache:mainfrom
andreahlert:fix/htaccess-deploy

Conversation

@andreahlert
Copy link
Contributor

Summary

  • Fix .htaccess not being deployed to asf-site branch: cp -r ... /* skips dotfiles. Added shopt -s dotglob before the copy.
  • Add build-time scan of Sphinx output to generate static HTML redirect pages (meta refresh + JS) for every old doc path, as fallback in case ASF infra does not process .htaccess.

Follows up on #679 where old Sphinx paths like /getting_started/install/ started returning 404 after the landing page migration moved docs to /docs/.

Test plan

  • Trigger workflow via workflow_dispatch and verify .htaccess exists in asf-site branch content/ directory
  • Verify redirect HTML files are generated for all Sphinx pages (check workflow logs for count)
  • Confirm https://burr.apache.org/getting_started/install/ redirects to /docs/getting_started/install/
  • Confirm with ASF infra (#asfinfra Slack) whether .htaccess is honored, then remove the HTML fallback step

The deploy step used `cp -r ... /*` which skips dotfiles, so .htaccess
was never copied to the asf-site branch. Add `shopt -s dotglob` to fix.

Also generate static HTML redirect pages by scanning the Sphinx build
output at build time, as fallback in case ASF infra does not process
.htaccess. See PR apache#679 for context.
@skrawcz skrawcz merged commit 9da8f29 into apache:main Mar 19, 2026
@andreahlert andreahlert deleted the fix/htaccess-deploy branch March 19, 2026 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants