Closed (fixed)
Project:
CDN
Version:
7.x-2.5
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
13 May 2012 at 22:32 UTC
Updated:
18 Jun 2015 at 13:45 UTC
Jump to comment: Most recent
Hi,
Can plaease somebody point me to correct setup if I want my files to be served from subdomain?
As I understood I should choose origin pull mode.
Then create a subdomain.
Copy all files inside same structure to new subdomain.
In config details of CDN module add new subdomain
Should I add some rules inside htaccess of new subdomain?
Thank you very much for help.
Comments
Comment #1
wim leersThe easiest way:
- make sure that your subdomains serve the exact same content as the main domain
- don't enable the CDN module's Far Future expiration, which requires special care
This issue is now dedicated to writing a tutorial on using subdomains + Far Futur expiration.
Comment #2
loparr commentedHi,
Thank you. I figured it out - in mapping I put url of my subdomain. Now is it possible to restrict files that only images are served from subdomain?
Thank you
Comment #3
wim leers#2: Yes, do something like this:
That's all :)
Comment #4
alexweber commentedWould it be possible to alter the URLs so that the subdomain tp map directly into sites/default/files?
So the file "http://domain.com/sites/default/files/foo/bar.jpg" would have its path altered to "http://sub.domain.com/foo/bar.jpg"?
Comment #5
wim leersSeems many people are able to figure this out on their own, so not writing a tutorial for this.