0

I have the following in my .htaccess located in http://cdn.example.com

Header add Access-Control-Allow-Origin "http://example.com"

When I go to my site it works fine and allows me to grab from my CDN.

BUT A user of my site just pointed out to me that when you go to www.example.com (www. before site name) it wont load font files. I tried adding another header add but it then says theres 2 values and it just goes for only one of them (example.com)

I have no idea how to fix this I generally want a way to fix this from htaccess and not from a php file.

John123
  • 193
  • 11
  • None of the answers helped... Im getting: `header has a value 'http://example.com' that is not equal to the supplied origin. Origin 'http://www.example.com' is therefore not allowed access.` – John123 Sep 14 '15 at 04:07
  • [Have a look at some of the answers on this question, they go into using regex as a solution](http://stackoverflow.com/questions/14003332/access-control-allow-origin-wildcard-subdomains-ports-and-protocols) – Bankzilla Sep 14 '15 at 05:03

0 Answers0