Complex and annoying CDN problem.

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
panic!
Forum Regular
Posts: 516
Joined: Mon Jul 31, 2006 7:59 am
Location: Brighton, UK

Complex and annoying CDN problem.

Post by panic! »

OK, bare with me on this.

I'm making a site for a client who insist on their site being delivered via a content delivery network (caching on multiple servers all over the world, like CacheFly or similar services.).

Here's the problem.

The site is developed on a dev server, let's say http://development.client.com/site/ then the content of the site is periodically read by the CDN/caching service and made available via http://www.client.com.

On the dev site I have <base href="http://development.client/site/"/> generated and set by the framework/cms so that when viewing on servers I don't have to do any messing around with URLS and it just works perfectly.

Obviously when the CDN/caching service reads http://development.client.com/site/ to be put on http://www.client.com it reads the base href as http://development.client.com/site/ and all the links on the real site all point to the dev version of the site, which is obviously wrong.

Anyone got any ideas?
User avatar
panic!
Forum Regular
Posts: 516
Joined: Mon Jul 31, 2006 7:59 am
Location: Brighton, UK

Re: Complex and annoying CDN problem.

Post by panic! »

ok I figured out how I'm gonna solve it if anyone cares.

I've changed my /etc/hosts to point client.com to development.client.com

sweet.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Complex and annoying CDN problem.

Post by Benjamin »

Doesn't that defeat the purpose of not having a single point of failure?
User avatar
panic!
Forum Regular
Posts: 516
Joined: Mon Jul 31, 2006 7:59 am
Location: Brighton, UK

Re: Complex and annoying CDN problem.

Post by panic! »

The hosts entry so I can access and use the CMS. Unless every customer who views the site edits their hosts file too they will view the site through the CDN.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Complex and annoying CDN problem.

Post by JAB Creations »

panic! wrote:OK, bare with me on this.
I dunno, will the mods tolerate nudity on the forums? 8O

Sorry that I don't have anything constructive to say but good luck. :P
User avatar
panic!
Forum Regular
Posts: 516
Joined: Mon Jul 31, 2006 7:59 am
Location: Brighton, UK

Re: Complex and annoying CDN problem.

Post by panic! »

oh yeah BEAR..my bad.

I sorted it anyway ;)
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Complex and annoying CDN problem.

Post by josh »

Did you abstract your URL generation, or at least put the base URL in a configuration file
Post Reply