Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users hit a 404 when they try to access the old securing apps guide #559

Open
ahus1 opened this issue Jan 30, 2025 · 4 comments
Open

Users hit a 404 when they try to access the old securing apps guide #559

ahus1 opened this issue Jan 30, 2025 · 4 comments

Comments

@ahus1
Copy link
Contributor

ahus1 commented Jan 30, 2025

Describe the problem

A lot of external pages link to and see a 404 page:

/docs/latest/security_apps/
/docs/latest/security_apps/index.html

It seems that ~200 users per day are affected.

Similar to that it happens for this older guide:

/docs/latest/server_installation/
/docs/latest/server_installation/index.html

It seems that ~50 users per day are affected.

Expected behavior

There should be redirects. While a page based redirect could forward to the overview, a JavaScript based approach could analyze the anchor and then direct to the right page in the new securing guide.

How to Reproduce?

Open the old link.

Anything else?

Having a JavaScript based approach on the 404 page would provide a better response code to automatic crawlers compared to 200 with a meta redirect. AFAIK no other redirect techniques exist for GitHub pages.

A 404 page where to add the necessary JavaScript is now available here: https://github.com/keycloak/keycloak-web/blob/main/pages/404.ftl

It should be simple to add new redirect to the page with and without a hash/anchor.

@ahus1
Copy link
Contributor Author

ahus1 commented Jan 30, 2025

Additional thoughts: IMHO JavaScript based redirects is the way, as it can also handle removed (JavaDoc) API docs to redirect to the latest.

@ahus1 ahus1 changed the title Users hit a 404 when they try to access the old security apps guide Users hit a 404 when they try to access the old securing apps guide Jan 30, 2025
@ahus1
Copy link
Contributor Author

ahus1 commented Jan 30, 2025

Kudos to @mhajas who researched that this is mostly external sites linking to the Keycloak website / cc: @stianst

@ahus1
Copy link
Contributor Author

ahus1 commented Jan 30, 2025

Initial PR to handle the base functionality in #560

ahus1 added a commit that referenced this issue Feb 3, 2025
Related to #559

Signed-off-by: stianst <stianst@gmail.com>
Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
Co-authored-by: Alexander Schwartz <aschwart@redhat.com>
@ahus1
Copy link
Contributor Author

ahus1 commented Feb 3, 2025

Fist redirect support is available. Next iteration is to add redirects for each old chapter.

@ahus1 ahus1 self-assigned this Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant