This method maps a URL to a project.
Syntax
ReplicationServer.MapUrl(URL, Suffix)
Parameters
URL
Destination URL.
Suffix
Set this argument to Empty ("") before calling this method. Content Deployment returns the relative path from the base project directory that maps to the destination URL.
Remarks
MapURL finds the best match of a given URL to a Content Deployment project.
Example
The following example retrieves and displays the project that best matches the URL http://www.mymachine.com/.
Option Explicit
On Error Resume Next
dim ReplServer
set ReplServer = CreateObject("CrsApi.ReplicationServer")
ReplServer.Initialize("")
dim Project
dim Suffix
Suffix = ""
set Project = ReplServer.MapURL("http://www.mymachince.com/", Suffix)
if IsEmpty(Project) then
Wscript.Echo "No project maps to http://www.mymachine.com/."
else
Wscript.Echo "Project" & Project.Name & "maps to http://www.mymachine.com/."
Wscript.Echo "The suffix is: " & Suffix
end if
'Release objects
set ReplProject = Nothing
set ReplServer = Nothing