diff --git a/INSTALL.txt b/INSTALL.txt
index 4e8ede3..4f8004a 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.admin.inc b/stage_file_proxy.admin.inc
index 84c9521..1bd6f61 100644
--- a/stage_file_proxy.admin.inc
+++ b/stage_file_proxy.admin.inc
@@ -12,6 +12,13 @@ function stage_file_proxy_settings() {
     '#default_value' => variable_get('stage_file_proxy_origin', NULL),
     '#required' => TRUE,
   );
+  $form['stage_file_proxy_origin_dir'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Origin server public file system path'),
+    '#description' => t('Public path of the remote site from which missing files will be retrieved.'),
+    '#field_suffix' => t('(no trailing slash)'),
+    '#default_value' => variable_get('stage_file_proxy_origin_dir',variable_get('file_public_path', conf_path() . '/files')),
+  );
   $form['stage_file_proxy_use_imagecache_root'] = array(
     '#type' => 'checkbox',
     '#title' => t('Download source image files'),
diff --git a/stage_file_proxy.module b/stage_file_proxy.module
index b31a287..db96810 100644
--- a/stage_file_proxy.module
+++ b/stage_file_proxy.module
@@ -29,6 +29,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
@@ -44,10 +49,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;
@@ -60,20 +65,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);
