diff --git a/INSTALL.txt b/INSTALL.txt
index 06c2a2a..a386281 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -23,3 +23,12 @@ Default is FALSE.
 If this is true then Stage File Proxy will not transfer the remote file to the
 local machine, it will just serve a 301 to the remote file and let the origin
 webserver handle it.
+
+$conf['stage_file_proxy_origin_dir'] = 'sites/default/files';
+
+Default is 'sites/default/files';
+
+If this is set then Stage File Proxy will use a different path for the remote
+files. This is useful for multisite installations where the sites directory
+contains different names for each url. If this is not set, it defaults to the
+same path as the local site (sites/default/files).
diff --git a/stage_file_proxy.module b/stage_file_proxy.module
index 3826fbf..dc1e37d 100644
--- a/stage_file_proxy.module
+++ b/stage_file_proxy.module
@@ -13,6 +13,11 @@ function stage_file_proxy_init() {
     return;
   }
 
+  // Note if the origin server files location is different. This
+  // must be the exact path for the remote site's public file
+  // system path, and defaults to the local public file system path.
+  $remote_file_dir = trim(variable_get('stage_file_proxy_origin_dir', $file_dir),'/');
+
   $relative_path = drupal_substr($_GET['q'], drupal_strlen($file_dir) + 1);
 
   // get origin server
@@ -28,10 +33,10 @@ function stage_file_proxy_init() {
     }
 
     if (variable_get('stage_file_proxy_hotlink', FALSE)) {
-      header("Location: $server/{$_GET['q']}");
+      header("Location: $server/$remote_file_dir/$relative_path");
       exit;
     }
-    elseif (_stage_file_proxy_fetch($server, $relative_path)) {
+    elseif (_stage_file_proxy_fetch($server, $remote_file_dir, $relative_path)) {
       // Just refresh this request and let the web server work out the mime type, etc.
       header("Location: /{$_GET['q']}");
       exit;
@@ -44,20 +49,22 @@ function stage_file_proxy_init() {
   }
 }
 
-function _stage_file_proxy_fetch($server, $relative_path) {
+function _stage_file_proxy_fetch($server, $remote_file_dir, $relative_path) {
   $dirs = explode('/', $relative_path);
   $filename = array_pop($dirs);
   $tree = array();
   $file_dir = _stage_file_proxy_file_dir();
   $dir_path = $file_dir;
+  $remote_dir_path = $remote_file_dir;
   foreach ($dirs as $dir) {
     $tree[] = $dir;
     $dir_path = $file_dir . '/' . implode('/', $tree);
+    $remote_dir_path = $remote_file_dir . '/' . implode('/', $tree);
     if (!is_dir($dir_path)) {
       mkdir($dir_path);
     }
   }
-  $url = $server . '/' . $dir_path . '/' . rawurlencode($filename);
+  $url = $server . '/' . $remote_dir_path . '/' . rawurlencode($filename);
   $ch = curl_init($url);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
   curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
