HttpContext.Current.RewritePath method Rewrite URL

Source: Internet
Author: User
Tags httpcontext

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.