The URL I specified in sitemap is https://pil0txia.netlify.app/post/2020-09-02_Angel-Beats!/ ,which has uppercase characters. Netlify will automatically rewrite/redirect https://pil0txia.netlify.app/post/2020-09-02_Angel-Beats!/ to https://pil0txia.netlify.app/post/2020-09-02_angel-beats!/ . However, the redirect won’t happen when I deployed my Hexo site to OSS+CDN (for example Backblaze B2 + Cloudflare) and I prefer the latter.
I didn’t enable Asset Optimization/Pretty URLs or netlify.toml. Please tell me how to solve it. Thanks a lot!
I only just found this out. This is a mistake. We should be completely in control of the casing of our resources. I have a bunch of 301 redirects that Google doesn’t like because my Sitemap and links all over the internet uses the correct casing, but you guys redirect to lower-case. We really need to be able to disable this, please.
Netlify automatically normalises URLs to lowercase and there’s no way to disable it.
Redirecting URLs seems like a bad default, and even worse if it’s not a setting. Our application’s back-end uses case-sensitive paths, and when these are transformed, we get 404s from our back-end. Completely breaks our service, as some resources have case-sensitive URLs (which should be OK according to the URL spec)
Many apps use NanoID, for example. These would all break if I’m understanding this correctly.
Hugo supports a config option that addresses this problem:
disablePathToLower = true
Based on my testing, Netlify apparently does not respect this feature. To fix the underlying option, perhaps Netlify should support the option that Hugo supports.
@promer Cloudflare Pages supports lowercase, UPPERCASE, and MiXeDcAsE for paths (the lowercase path exists, but doesn’t force a redirect). Perhaps this is an option for your situation. Here’s the Hugo deploy guide
Thanks to hrishhikesh. It is helpful for everyone to have clarity about what to expect.
Thanks also for the suggestion that I look at Cloudflare. I’ve been happy with Netlify and this particular issue has never come up before, but I’ve recently found that it would be helpful to have a page with a URL that this forum won’t let me display. I’ll give it in two pieces: Concatenate:
If you click through you will see why I want this URL. You will get to the right page because of a redirect to the page with the lowercaseed version of the URL. But as the content of the page makes clear, the URL (which is URLsafe Base64) has meaning and the meaning changes radically if you change the case.
Thanks for the suggestion. In short, yes, it would be a good solution.
I tried to write back once before but didn’t format the links correctly, so my reply got caught in the spam filter; in fairness to the filter, it did look pretty spammy.
In any case, if I understand correctly, I can tell people to use this request:
Hi, @promer. They would see the URL with the ? in it but access token will still be the end of the URL. It will show the content for the https://paulromer.net/F4qzRqQSe6FRCdhxBcMCdhYnDg8fwz4WijxHGCnXCvY= page but the ? will be in the URL in the browser’s address bar.