I'm new to mod_rewrite!
We are tryinf to figure out a way to replicate all images to a remote server, and serve them from there, to preserve our offices bandwidth.
Is it possible for Apache/Mod_rewrite to check to see if an image exists on a remote server and, if it does, compare modification dates and then (if necessary) rewrite the URL to point to the remote file?
i.e our webserver is at http://our.server.com
We have all images replicated at http://remote.server.com/images/
if an html page contains a relative link to an image, say: /some_images/image.gif We want to check first to see if http://remote.server.com/images/some_images/image.gif exists and, if it does, rewrite the URL.
Ideally, we would also like to come up with a way to check modification dates as well, so that if a local image that had recently been uploaded had not been replicated to the remote server yet, then the local image is used.
Is this all possible with mod_rewrite?
Examples extremely welcome!
Al Fleming