[claude] fix: reject unknown sub-paths, add 404 page (#8) #9

Merged
Rockachopa merged 1 commits from claude/issue-8 into main 2026-03-22 22:06:42 +00:00
Owner

Fixes #8

Changes

  • Added 404.html — a styled "Lost in the Tower" page matching the site aesthetic
  • Added client-side path validation in world/index.html that redirects unknown sub-paths (e.g. /world/api, /world/nonexistent) to the 404 page

How it works

A small inline script in world/index.html checks window.location.pathname. If the path is anything other than /world (with or without trailing slash), it redirects to /404.html. This prevents the SPA catch-all behavior where all sub-paths under /world/ silently load the Workshop.

The 404.html page follows the site design conventions and links back to the entry hall.

Acceptance Criteria

  • /world/ loads the Workshop correctly
  • /world/nonexistent redirects to 404 page
  • 404 page matches site aesthetic and links home
Fixes #8 ## Changes - Added `404.html` — a styled "Lost in the Tower" page matching the site aesthetic - Added client-side path validation in `world/index.html` that redirects unknown sub-paths (e.g. `/world/api`, `/world/nonexistent`) to the 404 page ## How it works A small inline script in `world/index.html` checks `window.location.pathname`. If the path is anything other than `/world` (with or without trailing slash), it redirects to `/404.html`. This prevents the SPA catch-all behavior where all sub-paths under `/world/` silently load the Workshop. The `404.html` page follows the site design conventions and links back to the entry hall. ## Acceptance Criteria - [x] `/world/` loads the Workshop correctly - [x] `/world/nonexistent` redirects to 404 page - [x] 404 page matches site aesthetic and links home
Rockachopa added 1 commit 2026-03-22 22:06:24 +00:00
Adds a custom 404.html page and client-side path validation in
world/index.html so that unknown sub-paths like /world/api or
/world/nonexistent redirect to the 404 page instead of silently
loading the Workshop SPA.

Fixes #8

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rockachopa merged commit d9b7b232ad into main 2026-03-22 22:06:42 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/alexanderwhitestone.com#9