nginx可以打开的页面,包含非ASCII CHACTER,给予404

发布于 2025-01-18 04:08:00 字数 394 浏览 3 评论 0原文

虽然文件本身存在于服务器上,但当尝试访问包含非 ASCII 字符的文件时,nginx 会给出 404 错误。在本例中为克罗地亚字母: č š ć đ ž

例如: https://jordanovac.hr/wp-content/uploads/PODLOGA-ZA-MIŠA_4.jpg

磁盘上的文件完全保存为: PODLOGA-ZA-MIŠA_4.jpg

是否有任何其他选项需要在配置文件中启用?如何让它发挥作用?

重命名文件肯定不是一个选项,有超过 10,000 个文件的文件名中包含此类字符。

While the file itself exists on the server, nginx gives 404 when trying to access files that contain non-ASCII characters. In this case it is croatian letters: č š ć đ ž

For example: https://jordanovac.hr/wp-content/uploads/PODLOGA-ZA-MIŠA_4.jpg

The file on the disk is saved exactly as: PODLOGA-ZA-MIŠA_4.jpg

Are there any additional options that should be enabled inside the config file? How to get this to work?

Renaming the files is most certainly not an option, there are more than 10.000 files containing such characters in the filename.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

傲娇萝莉攻 2025-01-25 04:08:00

我的 nginx 也有类似的问题。

尽管我在 nginx.conf 中设置了字符集 utf-8;,对于文件名 ex 中包含波兰语字符的文件,nginx 仍然返回错误 404 异常。 zdjęcie-32.jpg

I have similar issue in my nginx.

Despite I set in the nginx.conf charset utf-8;, nginx still return error 404 exception for files what has polish characters in filename ex. zdjęcie-32.jpg

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文