나는 fontawesome과 함께 작동하지만 www가없는 사이트를 입력하면 내 사이트가 있습니다. 이전에는 아이콘이 표시되지 않았습니다. 내가 www. 앞에 그들은 op를 보여준다. 무엇을 변경해야합니까? 문제의 사이트가 www.bluestar.be 및 bluestar.beFontAwesome without without www
편집이다 : 이것은 내 콘솔입니다 :
Access to Font at 'http://www.bluestar.be/sites/all/themes/rhythm/fonts/fontawesome-webfont.ttf?v=4.4.0' from origin 'http://bluestar.be' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://bluestar.be' is therefore not allowed access.
해결 나는 www.site.com에 site.com을 리디렉션 코드에 다음 줄을 추가
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule^http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
두 링크 모두 잘 작동합니다. ... –
.htaccess 파일을 수정하고 "Access-Control-Allow-Origin"을 설정해야합니다. 두 가지 경우 모두 글꼴을 멋지게 만들 수 있습니다. 이 [http : //drupal.stackexchange.com/questions/164096/font-awesome-not-working-when-using-http] –