HttpContext.RewritePath Method (String, String, String, Boolean)
Assembly: System.Web (in system.web.dll)
public: void RewritePath ( String^ filePath, String^ pathInfo, String^ queryString, bool setClientFilePath )
public void RewritePath ( String filePath, String pathInfo, String queryString, boolean setClientFilePath )
public function RewritePath ( filePath : String, pathInfo : String, queryString : String, setClientFilePath : boolean )
Not applicable.
Parameters
- filePath
The virtual path to the resource that services the request.
- pathInfo
Additional path information to use for the URL redirect.
- queryString
The request query string to use for the URL redirect.
- setClientFilePath
true to set the file path used for client resources to the value of the filePath parameter; otherwise false.
The filePath parameter does not include the content of the pathInfo parameter. 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.
To ensure that the virtual path that is used to construct paths to resources is not modified, set the setClientFilePath parameter to false. A common scenario in which you might want to set setClientFilePath to false is when you need to rewrite the URL, and you are using themes and redirecting the URL to a resource located in a different folder than the requested resource.