浏览器的控制台给了我这两个错误:
1) Failed to load resource: the server responded with a status of 403 (Forbidden)
2) new.html:1 XMLHttpRequest cannot load http://static.example.com/img/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.example.com' is therefore not allowed access. The response had HTTP status code 403.
我认为我的.htaccess文件已正确配置并放在img folder
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "http://www.example.com"
</IfModule>
我做错了什么? 谢谢!