Rehosting content from another server

Posted by Lana_M on Pro Webmasters See other posts from Pro Webmasters or by Lana_M
Published on 2014-04-19T14:13:05Z Indexed on 2014/08/24 16:29 UTC
Read the original article Hit count: 246

Filed under:
|
|

We have a set of static pages that will augment a customer's existing site. The pages will not reside on the customer's servers for logistical reasons and because we need to maintain control of the content. The plan is for the customer to set up a mod_rewrite rule that will funnel certain types of URLs to a single server-side handler script that will grab the appropriate file from a CDN and just output its content. This illustrates the approach:

<?php echo(file_get_contents(str_replace($customer_host, $cdn_host, $_SERVER['REQUEST_URI']))); ?>

Can anyone think of pitfalls or offer up a different approach? Is there some way to circumvent a script altogether?

© Pro Webmasters or respective owner

Related posts about web-hosting

Related posts about mod-rewrite