Top Nav

Reverse Proxy With Content Rewrites

One of our clients is a school district that wanted to make content on http://www.khanacademy.org/ (KA) available to users without Youtube. The KA site uses a bit of javascript to test if the user’s browser can get to youtube and if not it servers videos from an different source. Unfortunately this was not working for the client.

To solve the problem we setup mod_proxy as a reverse proxy. Then we used mod_headers, mod_filter and mod_substitute to rewrite the javascript going to client and force the use of the youtube alternative.

Here’s the apache config that does the content rewrite. It’s located in the reverse proxy virtual host: