Closed xander-marjoram closed 1 year ago
I don't think so, no. 404s get redirected to 404.html at the root of your site.
If you were using e.g. an Apache web server, you could change the config to have a different 404 page per directory. GitHub Pages doesn't allow you that level of customisation.
Hello, thanks for making this great Action. I'm trying to test adding a new 404 page and wondered if I'm going about it the wrong way.
The docs for GitHub Pages say that you can have a custom 404 page by putting a
404.html
in the root of the deployment.If I create a 404 page and add it as part of a PR, I can see it by going to
https://[owner].github.io/[repo]/pr-preview/pr-[number]/404.html
but it does not function as a catch-all, for example when I go tohttps://[owner].github.io/[repo]/pr-preview/pr-[number]/this/page/does/not/exist
I see the default GitHub Pages 404 instead of mine. Would it be possible to get this working?