从开发转向生产,FA 图标现在是正方形

Moving from development to production and FA icons are now squares

Development

Production

我已经阅读了大量其他帖子,其中 99% 归结为路径问题。但是,如果您查看我的网站,您会发现它正在正确加载图标文件:

请求URL:http://www.blackrhinounion.com/wp-content/themes/Centum/font/fontawesome-webfont.woff2?v=4.3.0 请求 Method:GET 状态 Code:304 未修改

所以我认为是其他原因造成的?

(编辑)在 .htaccess 中尝试:

# Allow access from all domains for webfonts.
# Alternatively you could only whitelist your
# subdomains like "subdomain.example.com".
<IfModule mod_headers.c>
  <FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css|css)$">
    Header set Access-Control-Allow-Origin "*"
  </FilesMatch>
</IfModule>

它仍然没有修复它。

想通了。

WP_SITEURL 有一个 www,而 WP_HOME 没有。这导致了跨源问题,删除 www 修复了所有问题。