首页 > 解决方案 > Apache/Wordpress 不返回 UTF 编码文件

问题描述

我正在将旧的 Apache+Wordpress 服务器迁移到 AWS。我已按照此处的通用安装指南进行操作,除了未获取带有编码字符的文件(返回 404)外,一切正常。其他资产运行良好。

例如,这是来自浏览器的失败请求:

https://example.com/ja/blog/wp-content/uploads/2021/08/PressRelaese-%E3%83%86%E3%82%99%E3%82%B7%E3%82%99%E3%82%BF%E3%83%AB%E3%82%AD%E3%83%A5%E3%83%BC%E3%83%95%E3%82%99.png

这是响应标头:

cache-control: no-cache, must-revalidate, max-age=0
content-type: text/html; charset=UTF-8
date: Mon, 06 Sep 2021 09:56:40 GMT
expires: Wed, 11 Jan 1984 05:00:00 GMT
link: <https://example.com/ja/blog/wp-json/>; rel="https://api.w.org/"
server: Apache/2.4.48 ()
x-powered-by: PHP/7.2.34

当我检查服务器中的文件时,它保存如下:

PressRelaese-#U30c6#U3099#U30b7#U3099#U30bf#U30eb#U30ad#U30e5#U30fc#U30d5#U3099.png

我应该在 Apache/Wordpress 中设置任何编码设置吗?为什么 Apache 无法提供此文件?

标签: wordpressapache

解决方案


推荐阅读