Επεξεργασία

Κοινή χρήση μέσω


HttpContextBase.RewritePath Method

Definition

When overridden in a derived class, assigns an internal rewrite path, which lets the request URL differ from the internal path of the resource.

Overloads

RewritePath(String, String, String, Boolean)

When overridden in a derived class, rewrites the URL by using the specified path, path information, query string information, and a value that specifies whether the client file path is set to the rewrite path.

RewritePath(String, String, String)

When overridden in a derived class, rewrites the URL by using the specified path, path information, and query string information.

RewritePath(String, Boolean)

When overridden in a derived class, rewrites the URL by using the specified path and a value that specifies whether the virtual path for server resources is modified.

RewritePath(String)

When overridden in a derived class, rewrites the URL by using the specified path.

RewritePath(String, String, String, Boolean)

When overridden in a derived class, rewrites the URL by using the specified path, path information, query string information, and a value that specifies whether the client file path is set to the rewrite path.

public:
 virtual void RewritePath(System::String ^ filePath, System::String ^ pathInfo, System::String ^ queryString, bool setClientFilePath);
public virtual void RewritePath (string filePath, string pathInfo, string queryString, bool setClientFilePath);
abstract member RewritePath : string * string * string * bool -> unit
override this.RewritePath : string * string * string * bool -> unit
Public Overridable Sub RewritePath (filePath As String, pathInfo As String, queryString As String, setClientFilePath As Boolean)

Parameters

filePath
String

The replacement path.

pathInfo
String

Additional path information for a resource.

queryString
String

The request query string.

setClientFilePath
Boolean

true to set the file path used for client resources to the value of the filePath parameter; otherwise, false.

Exceptions

Applies to

RewritePath(String, String, String)

When overridden in a derived class, rewrites the URL by using the specified path, path information, and query string information.

public:
 virtual void RewritePath(System::String ^ filePath, System::String ^ pathInfo, System::String ^ queryString);
public virtual void RewritePath (string filePath, string pathInfo, string queryString);
abstract member RewritePath : string * string * string -> unit
override this.RewritePath : string * string * string -> unit
Public Overridable Sub RewritePath (filePath As String, pathInfo As String, queryString As String)

Parameters

filePath
String

The replacement path.

pathInfo
String

Additional path information for a resource.

queryString
String

The request query string.

Exceptions

Applies to

RewritePath(String, Boolean)

When overridden in a derived class, rewrites the URL by using the specified path and a value that specifies whether the virtual path for server resources is modified.

public:
 virtual void RewritePath(System::String ^ path, bool rebaseClientPath);
public virtual void RewritePath (string path, bool rebaseClientPath);
abstract member RewritePath : string * bool -> unit
override this.RewritePath : string * bool -> unit
Public Overridable Sub RewritePath (path As String, rebaseClientPath As Boolean)

Parameters

path
String

The replacement path.

rebaseClientPath
Boolean

true to reset the virtual path; false to keep the virtual path unchanged.

Exceptions

Applies to

RewritePath(String)

When overridden in a derived class, rewrites the URL by using the specified path.

public:
 virtual void RewritePath(System::String ^ path);
public virtual void RewritePath (string path);
abstract member RewritePath : string -> unit
override this.RewritePath : string -> unit
Public Overridable Sub RewritePath (path As String)

Parameters

path
String

The replacement path.

Exceptions

Applies to