Index: kernel/classes/webdav/ezwebdavcontentserver.php
===================================================================
--- kernel/classes/webdav/ezwebdavcontentserver.php	(revision 20526)
+++ kernel/classes/webdav/ezwebdavcontentserver.php	(working copy)
@@ -1512,15 +1512,44 @@
         }
 
         $scriptURL = $_SERVER["SCRIPT_URL"];
+        $trimmedScriptURL = trim( $_SERVER["SCRIPT_URL"], '/' );
+
         if ( strlen( $scriptURL ) > 0 and $scriptURL[ strlen( $scriptURL ) - 1 ] != "/" )
             $scriptURL .= "/";
 
+        $scriptURLParts = explode( '/', $trimmedScriptURL );
+        $urlPartCount = count( $scriptURLParts );
+
+        if ( $urlPartCount >= 2 )
+        {
+            // one of the virtual folders
+            // or inside one of the virtual folders
+            $siteAccess = $scriptURLParts[0];
+            $virtualFolder = $scriptURLParts[1];
+
+            // only when the virtual folder is Content we need to add its path to the start URL
+            // the paths of other top level folders (like Media) are included in URL aliases of their descending nodes
+            if ( $virtualFolder == VIRTUAL_CONTENT_FOLDER_NAME )
+            {
+                $startURL = '/' . $siteAccess . '/' . $virtualFolder . '/';
+            }
+            else
+            {
+                $startURL = '/' . $siteAccess . '/';
+            }
+        }
+        else
+        {
+            // site access level
+            $startURL = $scriptURL;
+        }
+
         // Set the href attribute (note that it doesn't just equal the name).
         if ( !isset( $entry['href'] ) )
         {
             if ( strlen( $suffix ) > 0 )
                     $suffix = '.' . $suffix;
-            $entry["href"] = $scriptURL . $node->urlAlias() . $suffix;
+            $entry["href"] = $startURL . $node->urlAlias() . $suffix;
         }
         // Return array of attributes/properties (name, size, mime, times, etc.).
         return $entry;
