UnmapVirtualHost Method  
 

Removes the mapping of a virtual host name to a folder path.

Syntax

object.UnmapVirtualHost( HostName )

Parameters

HostName
A string which specifies the virtual host name whose mapping should be removed. This parameter cannot be an empty string

Return Value

Returns True if the host name was removed from the virtual host mapping. If the host name is invalid or was not mapped, the method returns False.

Remarks

The UnmapVirtualHost function removes a virtual host mapping previously established using MapVirtualHost. After the mapping is removed, the browser can no longer use the virtual host name to load resources from the associated local directory. This does not delete or modify any files in the directory, nor does it affect other virtual host mappings.

Removing a mapping only affects the current browser control. Other instances that have independently established a mapping for the same host name are not affected, even if they share the same browser environment or user data folder.

Removing a mapping does not automatically unload documents or resources that have already been loaded from the virtual host. However, subsequent requests for resources using that host name will no longer be resolved to the local directory. Applications should navigate to another document or reload the current document as appropriate after removing a mapping.

Virtual host mappings are automatically discarded when the control is destroyed, so it is not necessary to explicitly remove them before closing the browser.

See Also