Skip to content

Pages: Document subdirectory 404.html workaround for SPA + static asset 404 handling #29676

@linkp

Description

@linkp

Existing documentation URL(s)

What changes are you suggesting?

The docs describe SPA mode and 404.html behavior in isolation but don't document how to combine them. A 404.html placed in a subdirectory (e.g. /static/) causes Pages to return 404 Not Found for unmatched requests under that path, while root-level SPA routing continues to work normally. This is useful for SPAs that serve hashed static assets from a subdirectory — missing assets return a proper 404 rather than a 200 OK with index.html content. A note or example explaining this pattern should be added to the SPA rendering and/or Not Found behavior sections.

Additional information

This pattern was independently discovered by a customer and documented here: https://community.cloudflare.com/t/angular-chunk-load-error-wrong-mime-type-vol-2/915855

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions