0

I'm building a gatekeeper app that lets the owner of MyClientsSite.com show a modified page that I'm hosting on MySite.com, but visitors to MyClientsSite.com can't know that the modified page is coming from me.

And if the page doesn't exist on my MySite.com site, it should go ahead and serve up the default page.html hosted on MyClientsSite.com like it normally would.

So what I want to know is how would I set this up given that I obviously have FULL access to MySite.com, but only domain-level access (no FTP) to MyClientsSite.com? Thanks in advance

1
  • Still researching this. Could this be done with a failover setup (have client point A records to me, then i can somehow trigger a failover if the page doesn't exist)? What about multiple A records (with my site's ip address as the first and theirs as the second) Mar 9, 2011 at 20:33

2 Answers 2

0

You can't gain this behavior with DNS.

You can have multiple A records, but it will just work as round robin then. Also DNS has TTL (Time To Live), so you will run into trouble if you want to do the failover thing, unless your TTL is very very short, which is against all recommendations.

0

I can imagine two ways to accomplish this. The first is lighter on your side in terms of bandwidth, but requires more access to the client's site. The second requires very little access to the customer's site, but proxies all data through your site, potentially increasing your bandwidth costs:

1) At a minimum, you would need to install a .htaccess file, and some variety of PHP, CGI or other program to do the page retrieval on myclientssite.com. Myclientssite.com would also need to enable mod_rewrite to accomplish this. Requests are routed to the PHP script, which checks for the existence of a matching file from your server. If it exists, it essentially acts as a proxy, and forwards the data. (Your server should engineer the correct data, this client script will just pass that along) If your server gives a 404, the script could either serve the local page itself, or via a redirect rule, hand processing back to apache. Just a word of warning: This kind of processing can get expensive after a short period of time, so you should include some sort of cache list, or file listing from your server so the script can tell after a short time what files it needs to fetch, and which it should pass through.

2) Another solution might be to have your client create a DNS alias to your site (protected.myclientsite.com) and have your server reverse-proxy their data. The client would then set an ACL to only allow your site to read files from the actual protected site. This will increase your bandwidth usage however, and so is less than ideal if the protected data is say... large pictures, video files, etc.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .