In Cloudflare Pages file _redirects
I have:
/redirectedurl https://domain.tld/#something 307
but Cloudflare make redirect to https://domain.tld/#something#something
(doubled #something).
What can I do?
In Cloudflare Pages file _redirects
I have:
/redirectedurl https://domain.tld/#something 307
but Cloudflare make redirect to https://domain.tld/#something#something
(doubled #something).
What can I do?
Hello there, I’m sorry to hear that you are experiencing difficulties.
Could you share the full code snippet of this URL redirect?
Also, what are the steps to replicate this issue?
@L.Cardoso – this is the same issue as Cloudflare pages _redirects file does not work with # anchors
If the URL in the _redirects
file on Cloudflare Pages contains the #
character, it is added twice to the final URL to which it is redirected.
Example _redirects
file content:
/toredirect https://cloudflare.com/#123 307
Effect:
When I enter the https://mycloudflarepageswebsite.com/toredirect
I am being redirected to https://cloudflare.com/#123#123
. #123
part of URL is doubled.
Expected effect:
When I enter the https://mycloudflarepageswebsite.com/toredirect
I am being redirected to https://cloudflare.com/#123
. URL is correct.
Hello gain, thanks for the details.
Allow me to check the status with my team internally as we are aware of the bug and are already in the process of fixing it.
We’ll keep you posted.
@L.Cardoso - any news?
Hello @ja11,
Apologies for the delay since our last communication.
I’m in touch with the product team to clarify the status of the fix. I’ll keep you posted.
Hello again @ja11
The team has fixed it here fix: Pages asset-server duplicating the hash component by jrf0110 · Pull Request #2303 · cloudflare/workers-sdk · GitHub
Let me know if you still face this issue. Thanks for using Cloudflare.
@L.Cardoso – This is some old fix on GitHub, from before my report.
In any case, the problem still persists.
Hello, I just filed an internal ticket (CUSTESC-44240) to have this issue reviewed by our product team.
We’ll keep you posted.
I asked our engineering team for an update here (CUSTESC-44240). I’ll keep you posted.