-
AuthorPosts
-
January 27, 2016 at 7:48 pm #767891
Hi there,
My font-awesome icons no longer seem to be displaying. When I view source on my pages, I see this message:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://vendini.co/wp-content/themes/x/framework/fonts/font_awesome/fontawesome-webfont.ttf?v=4.3.0.
Do you know why this would be occurring and how I can get the font to load?
My site: http://www.vendini.com
Thanks!
JoanJanuary 28, 2016 at 12:04 am #768234Hi Joan,
Please check this thread for FONT CROSS DOMAIN ISSUE:https://community.theme.co/forums/topic/x-shortcodesfontawesome-broken-in-firefox-after-v2-2-0-update/
Hope this helps.
January 28, 2016 at 7:55 pm #769735Thanks so much for this!
I tried adding both of the code snippets mentioned in that thread:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
# Apache config
<FilesMatch “.(eot|ttf|otf|woff|css)”>
Header set Access-Control-Allow-Origin “http://cdn.vendini.com”AddType image/svg+xml svg svgz
AddEncoding gzip svgz
AddType application/vnd.ms-fontobject eot
AddType font/truetype ttf
AddType font/opentype otf
AddType application/x-font-woff woff
</FilesMatch>But I’m still seeing the issue in Firefox. The problem seems to be stemming from the fact that the original site that is built on the X theme is vendini.co and it gets forwarded to http://www.vendini.com. It seems that something is breaking between the two sites because the icon font loads fine on vendini.co.
If you have any other ideas, I’d love to hear them! Thanks so much for your help.
January 29, 2016 at 12:28 am #770032Hi There,
Add this on top of your .htaccess file
Header add Access-Control-Allow-Origin "*" Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type" Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"
Similar to this:
Let us know how it goes.
Thanks!
January 29, 2016 at 3:48 pm #771239Hi there,
I added those three lines to what I already had and it’s still not working. Do I need to remove this part?
# Apache config
<FilesMatch “.(eot|ttf|otf|woff|css)”>
Header set Access-Control-Allow-Origin “http://cdn.vendini.com”AddType image/svg+xml svg svgz
AddEncoding gzip svgz
AddType application/vnd.ms-fontobject eot
AddType font/truetype ttf
AddType font/opentype otf
AddType application/x-font-woff woff
</FilesMatch>January 29, 2016 at 6:42 pm #771428Yup. That did it. I removed the apache config stuff and it works now! Thanks so much for your help 🙂
Header add Access-Control-Allow-Origin "*" Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type" Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS" # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
January 30, 2016 at 3:36 am #771746You’re welcome.
-
AuthorPosts