feat(routing): redirect section landings + harden 404 / no directory listings
Build and deploy / deploy (push) Successful in 23s

- astro.config.mjs: section-only URLs now redirect to the first article in
  that section. /whp/admin/ used to render Apache's directory listing
  because no index.html existed; now it serves a meta-refresh to
  /whp/admin/overview/. Same for /whp/, /whp/getting-started/,
  /whp/how-to/, /whp/site-builder/, /whp/reference/, /whp/add-ons/.
- public/.htaccess: ships in dist, disables Options Indexes + MultiViews
  (defense in depth so any future section without a redirect doesn't
  leak a listing), and routes 404/403 to /404.html.
- src/content/docs/404.md: replaces the bare 'check the URL' tagline
  with two explicit actions — 'Go to the knowledge base home' and
  'WHP getting started'.
This commit is contained in:
2026-05-18 11:18:35 -07:00
parent 119d376029
commit aeb033bae5
3 changed files with 44 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
---
title: Page not found
description: That URL doesn't exist on our knowledge base.
template: splash
editUrl: false
hero:
title: '404'
tagline: That URL doesn't exist on our knowledge base.
actions:
- text: Go to the knowledge base home
link: /
icon: right-arrow
variant: primary
- text: WHP getting started
link: /whp/getting-started/welcome/
variant: secondary
---