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



The internal rewrite path.


Additional path information for a resource.


The request query string.

Exception typeCondition


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


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

The filePath parameter does not include the pathInfo parameter content. For the URL, the filePath parameter is, 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