question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

🐛 BUG: Cannot redirect to page fragment in prod with Cloudflare Pages direct upload

See original GitHub issue

What version of Wrangler are you using?

2.0.12

What operating system are you using?

Linux

Describe the Bug

If I put /foo/ /#foo 301 in my _redirects file, this properly redirects as intended with wrangler pages dev, but with wrangler pages publish the fragment gets dropped and /foo/ just redirects to / instead of /#foo.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
sidharthachatterjeecommented, Jun 22, 2022

Thank you for the fix and for the notification!

Great experience on my first report, you’ll see me around! 😃

@Hexstream Yay! 🎉

1reaction
sidharthachatterjeecommented, Jun 21, 2022

Hey there! Thank you for this bug report.

This isn’t a wrangler issue per se but is indeed a bug in how we serve requests at the moment on Pages. Nonethless, we’ve created a ticket internally and are on it.

I’ll keep this open and give you a heads up once we ship it. Cheers!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug] Direct Uploads failed to parse _redirects and _headers ...
The problem is that the _redirects and _headers files cannot be parsed when publishing the Pages site via Direct Uploads.
Read more >
Redirects doesn't work correctly when using direct upload in ...
Hi, I'm trying Direct Upload in Cloudflare Pages, but I found out that some redirect rules does not work fine, especially splat.
Read more >
Known issues · Cloudflare Pages docs
Here are some known bugs and issues with Cloudflare Pages: ... Direct uploads allow you to integrate your own build platform or upload...
Read more >
Direct Uploads · Cloudflare Pages docs
In Account Home, select your account > Pages. Select Create a project > Direct Upload > enter your project name in the provided...
Read more >
Redirects · Cloudflare Pages docs
To use redirects on Cloudflare Pages, declare your redirects in a plain text file called _redirects without a file extension, in the output ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found