This documentation is archived and is not being maintained.

SPWeb.OriginalBaseUrl Method

Windows SharePoint Services 3

Returns the base URL for the current request.

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

public static string OriginalBaseUrl(
	HttpRequest r


Type: System.Web.HttpRequest
A System.Web.HttpRequest object that represents the request.

Return Value

Type: System.String
A string that contains the base URL.

The OriginalBaseUrl method is a static method and is called directly on the SPWeb class.

The following code example uses the OriginalBaseUrl method to display the base URL for the current request.

string strBaseUrl = SPWeb.OriginalBaseUrl(Request);