0

I am running a WordPress multisite blog and it is using SSL ... I am also using domain mapping for various sub blogs on the multisite network but the mapped domains are not on SSL ... I am having issues with the font I installed ... it is not loading on the mapped domain and In the console I am seeing this error

Font from origin 'https://examplesite.example.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://examplesite.com' is therefore not allowed access.

I am don't have any kind of caching service enabled (CloudFLare or MaxCDN). I am not sure what is the problem here ... Looking forward to your answers ... Thanks

  • Possible duplicate of [How to add an Access-Control-Allow-Origin header](http://stackoverflow.com/questions/5008944/how-to-add-an-access-control-allow-origin-header) – Tim Malone May 25 '16 at 06:05
  • Question also crossposted on Wordpress Stack Exchange. @Faisal Pls search before posting; this topic has been covered many times. – Tim Malone May 25 '16 at 06:06
  • @TimMalone ... I tried the answer in How to add an Access-Control-Allow-Origin header .... but didn't worked for me .. As I am running a multisite ... could this be a problem ? – Faisal Hussain May 25 '16 at 11:18

1 Answers1

0

Ok ... after all the searching this worked for me ... remember I am running a wordpress based multisite ...

Header set Access-Control-Allow-Origin "*"

Just added this below

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
</IfModule>