Open dtszwai opened 10 months ago
Hi, are you using yarn serve
or some third-party server. FYI, it works if you rename build/te.st/index.html
to build/te.st.html
for me when using yarn serve
. The reason is because our serve handler thinks .st
is already an extension, so it doesn't even try to lookup for te.st/index.html
. Theoretically, you should be able to make it emit te.st.html
in the first place with trailingSlash: false
, but our redirects plugin does not honor that.
@slorber, do you think it should output te.st.html
to make this case work? There are a lot possible redirect loops to be aware of, though!
Considering the redirect file te.st/index.html
is emitted, it looks like an issue with the way the static deployment is served, and it's likely that different hosts lead to different behaviors.
I don't know what to do exactly but we'd rather just say that the client redirect plugin is a best effort and can't work for all use-cases. It's not really worth investing a ton of time finding the impossible common denominator that works for all cases and hosts when client redirects are antipatterns in the first place 😅
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
I am using the plugin-client-redirects to redirect URLs, but it appears that redirects do not work for URLs containing periods (dots). Is this intended behavior, or is there a workaround to make such redirects work properly? (use createRedirects instead?)
Reproducible demo
No response
Steps to reproduce
docusaurus.config.js
Expected behavior
When I enter 'mysite.com/te.st,' it should redirect me to 'mysite.com/another,' but it doesn't work.
Actual behavior
the expected redirection is not occurring as intended
Your environment
Self-service