if (! IsPostBack) { //If the request ID is empty, the rewrite URL is: ~/index.aspx?id=shouji.115sou.com if (request.querystring["ID"]==null | | request.querystring["ID"]. Trim () = = "") { HttpContext.Current.RewritePath ("~/index.aspx?id=shouji.115sou.com"); } Response.Write (request.querystring["ID"]); }
|
Name |
Description |
|
RewritePath (String) |
The path of the rewrite URL |
|
RewritePath (String, Boolean) |
Overrides the path of the URL and A Boolean value that specifies whether to modify the virtual path of the server resource . |
|
RewritePath (String, String, String) |
Rewrites the URL by using the given path , path information , and query string information . |
|
RewritePath (String, String, String, Boolean) |
Rewrites the URL using the given virtual path , path information , query string information , and A Boolean value that specifies whether the client The file path is set to the rewrite path . |
HttpContext.Current.RewritePath method Rewrite URL