         if (rootURL &&
             !(url.indexOf(":") > -1 || url.indexOf("/") == 0 || url.indexOf("\\") == 0))
         {
+            // First strip off the search string and then any url fragments.
+            var index:int;
+            
+            if ((index = rootURL.indexOf("?")) != -1 )
+                rootURL = rootURL.substring(0, index);
+
+            if ((index = rootURL.indexOf("#")) != -1 )
+                rootURL = rootURL.substring(0, index);
+            
             // If the url starts from the current directory, then just skip
             // over the "./".
             // If the url start from the parent directory, the we need to

     *  @param rootURL An url that will form the root of the absolute url.
     *  If the <code>rootURL</code> does not specify a file name it must be 
     *  terminated with a slash. For example, "http://a.com" is incorrect, it
     *  should be terminated with a slash, "http://a.com/".
     * 
     *  When loading resources relative to an application, the rootURL is 
     *  typically the loaderInfo.url of the application.

    public static function normalizeURL(loaderInfo:LoaderInfo):String
    {
        var url:String = loaderInfo.url;
        var index:int;
        var searchString:String;
        var urlFilter:Function;
        var n:uint = LoaderUtil.mx_internal::urlFilters.length;
        
        for (var i:uint = 0; i < n; i++)
        {
            searchString = LoaderUtil.mx_internal::urlFilters[i].searchString;
            if ((index = url.indexOf(searchString)) != -1)
            {
                urlFilter = LoaderUtil.mx_internal::urlFilters[i].filterFunction;
                url = urlFilter(url, index);
            }
        }
        
        return url;
    }

    /**
