Closed CaMer0n closed 6 years ago
I tested this on PHP 5.6.29 and unfortunately it doesn't work with arrays, it throws "Constants may only evaluate to scalar values" error.
However if you define e_HTTP_STATIC like this:
const e_HTTP_STATIC = ['http://cdn1.test.com/', 'http://cdn2.test.com/', 'http://cdn3.test.com/e107v2/'];
It's working properly
Usage:
Create several subdomains with cdn1, cdn2, cdn3 etc for your domain, making sure that each of them point to the public_html folder. ie. When entered into the browser, each domain should appear identical to each other.
eg. Add the following to your e107_config.php file: (replacing each domain with the ones you just created)
Visit your main domain. If you check the source-code, you should find that your css, js and image files are loaded from each of these sub domains.
define('e_HTTP_STATIC', 'http://cdn1.test.com/');