Try this in the .htaccess of the external root folder :
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
And if it only concerns .js scripts you should wrap the above code inside this:
<FilesMatch "\.(js)$">
...
</FilesMatch>
More Related Contents:
- Access-Control-Allow-Origin Multiple Origin Domains?
- Header set Access-Control-Allow-Origin in .htaccess doesn’t work
- How can I fix the ‘Missing Cross-Origin Resource Sharing (CORS) Response Header’ webfont issue?
- Origin is not allowed by Access-Control-Allow-Origin
- AngularJS performs an OPTIONS HTTP request for a cross-origin resource
- .htaccess redirect all pages to new domain
- How to Block Spam Referrers like darodar.com from Accessing Website?
- IE9 jQuery AJAX with CORS returns “Access is denied”
- .htaccess – how to force “www.” in a generic way?
- convert original URL to friendly URL
- .htaccess redirect www to non-www with SSL/HTTPS
- .htaccess Rewrite to Force Trailing Slash at the end
- Forcing a download using in htaccess
- ReWrite rule to add .html extension
- Rewrite URL after redirecting 404 error htaccess
- No ‘Access-Control-Allow-Origin’ header is present on the requested resource- AngularJS
- .htaccess not working on localhost with XAMPP
- How to remove .htaccess password protection from a subdirectory
- Need to redirect all traffic to https
- Redirect .php URLs to URLs without extension [duplicate]
- Cross-domain requests stopped working due to no `Access-Control-Allow-Origin` header present in the response
- PHP Rewrite Rules
- .htaccess redirect – automatically add www. if no subdomain exists
- Ban IPs from text file using htaccess [closed]
- CORS – Tomcat – Geoserver
- Browser Canvas CORS Support for Cross Domain Loaded Image Manipulation
- htaccess rewrite url remove subdirectory
- Rewrite URL with .htaccess for multiple parameters
- .htaccess redirect
- Using mod rewrite to change URL with username variable