Replies: 3 comments 18 replies
-
Not totally related, but can be related: #927 |
Beta Was this translation helpful? Give feedback.
1 reply
-
One of my concerns is Waku's responsibility for redirects. Particularly, one big use case of Waku is static sites. Option 1: Waku or waku/router supports redirects natively |
Beta Was this translation helpful? Give feedback.
7 replies
-
How do other framework deal with redirects with client navigation? |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The problem
When working with large volumes of content, redirects are used to retain internal and external integrity when paths change. For example 20k news articles potentially contain links to
/about
which is changed to/about-us
. Even if the content management system could automatically update all references, it would mean that a lot of pages would have to be rebuilt and caches would be cleared. Redirects are a simple and efficient way to handle this.When the HTTP server redirects a path from
/about
to/about-us
, a Waku<Link>
component pointing to/about
will not follow the redirect, but display the404
error page instead. Directly accessing/about
will work as expected.This topic has also been discussed in PR #895. Some different approaches from there, along with their caveats.
createRedirect
API that can be used inentries.tsx
createRedirect
API that can be used inentries.tsx
/RSC/about.txt
to/RSC/about-us.txt
on the host systemPR with breaking test case
#928
Beta Was this translation helpful? Give feedback.
All reactions