How I can hide url

Posted by kamiar3001 on Stack Overflow See other posts from Stack Overflow or by kamiar3001
Published on 2010-05-21T07:12:17Z Indexed on 2010/05/21 7:50 UTC
Read the original article Hit count: 333

Filed under:
    void Application_BeginRequest(Object sender, EventArgs e)
    {
        HttpApplication app = sender as HttpApplication;
        if (app != null)
            if (app.Request.AppRelativeCurrentExecutionFilePath == "~/About.aspx")
                app.Context.RewritePath(
                    app.Request.Url.PathAndQuery.Replace("/About.aspx", "")
                );
    }

I want to hide url like the following :
requested url : "http://domain.com/WebFolder/page.aspx"
url should be show : "http://domain.com/WebFolder"

How I can do that I try the above code but it is not work causing to redirect new rewrite page I dont want it, I just want to hide my url for section of page name.

© Stack Overflow or respective owner

Related posts about ASP.NET