This documentation is archived and is not being maintained.

HttpContext.RewritePath Method (String, String, String)

Assigns an internal rewrite path with additional path and query string information.

Namespace: System.Web
Assembly: System.Web (in system.web.dll)

public void RewritePath (
	string filePath,
	string pathInfo,
	string queryString
)
public void RewritePath (
	String filePath, 
	String pathInfo, 
	String queryString
)
public function RewritePath (
	filePath : String, 
	pathInfo : String, 
	queryString : String
)

Parameters

filePath

The internal rewrite path.

pathInfo

Additional path information for a resource.

queryString

The request query string.

Exception typeCondition

ArgumentNullException

path is not within the current application's root directory.

HttpException

filePath is not within the current application's root directory.

The filePath parameter does not include the pathInfo parameter content. For the URL http://www.microsoft.com/virdir/page.html/tail, the filePath parameter is http://www.microsoft.com/virdir/page.html, and the pathInfo parameter is tail.

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1
Show: