private File htaccess_resolveDirectoryIndex( File requestedDir,
						 HypertextAccessFile htaccess ) {

	// This works only with directories.
	if( !requestedDir.isDirectory() )
	    return requestedDir;
	

	
	List<String> directoryIndexList = htaccess.getDirectoryIndexList();
	if( directoryIndexList.size() == 0 )
	    return requestedDir;
	
	

	File indexFile;
	for( int i = 0; i < directoryIndexList.size(); i++ ) {

	    indexFile = new File( requestedDir, directoryIndexList.get(i) );
	    if( indexFile.exists() ) {
	
		this.getHTTPHandler().getLogger().log( Level.INFO,
						       getClass().getName() + ".resolveDirectoryIndex(...)",
						       "DirectoryIndex file found: '" + indexFile.getPath() + "'." );
		return indexFile;

	    }

	}

	// None of the index files found.
	// Proceed with the directory file.
	this.getHTTPHandler().getLogger().log( Level.INFO,
					       getClass().getName() + ".resolveDirectoryIndex(...)",
					       "No DirectoryIndex file found! Proceeding with requested directory file." );
	return requestedDir;
    }