SPAlternateUrlCollectionManager.RebaseUriWithAlternateUri method (Uri, Nullable<SPUrlZone>)

Replaces the scheme, host, and port of the specified URI with the alternate access URI for the specified zone.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)


Public Function RebaseUriWithAlternateUri ( _
    requestUri As Uri, _
    desiredZone As Nullable(Of SPUrlZone) _
) As Uri
Dim instance As SPAlternateUrlCollectionManager
Dim requestUri As Uri
Dim desiredZone As Nullable(Of SPUrlZone)
Dim returnValue As Uri

returnValue = instance.RebaseUriWithAlternateUri(requestUri, _
public Uri RebaseUriWithAlternateUri(
    Uri requestUri,
    Nullable<SPUrlZone> desiredZone


  • requestUri
    Type: System.Uri

    A System.Uri object that specifies the request URI to rebuild using the correct response URI base.

Return value

Type: System.Uri
A System.Uri object that represents the mapped alternate access URI.

See also


SPAlternateUrlCollectionManager class

SPAlternateUrlCollectionManager members

RebaseUriWithAlternateUri overload

Microsoft.SharePoint.Administration namespace