nginx可以打开的页面,包含非ASCII CHACTER,给予404
虽然文件本身存在于服务器上,但当尝试访问包含非 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的 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