TaxonomyNavigation.GetTargetForRootFriendlyUrl method
Returns the target page as a server-relative URL when the specified SPWeb is configured to use a root-friendly URL.
Namespace: Microsoft.SharePoint.Publishing.Navigation
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax
'Declaration
Public Shared Function GetTargetForRootFriendlyUrl ( _
web As SPWeb _
) As String
'Usage
Dim web As SPWeb
Dim returnValue As String
returnValue = TaxonomyNavigation.GetTargetForRootFriendlyUrl(web)
public static string GetTargetForRootFriendlyUrl(
SPWeb web
)
Parameters
web
Type: Microsoft.SharePoint.SPWebThe SPWeb object to check
Return value
Type: System.String
If the specified SPWeb object is configured to use a root-friendly URL, then the target page as a server-relative URL; otherwise, an empty string
Remarks
The root-friendly URL is a site URL that renders the Welcome Page by using URL rewriting instead of redirecting to the URL of the Welcome Page. For example, if the Welcome Page is configured as http://example.com/Pages/Default.aspx, then the corresponding root friendly URL is http://example.com. If managed navigation is not enabled, then the server renders http://example.com as a 302 redirect to the welcome page.
The return value is never a null reference (Nothing in Visual Basic).