Shauki Bagdadi wrote:
> Hello!
> Have you found the solution for 
> http://lists.ximian.com/pipermail/mono-list/2007-August/036106.html
> May you share it, please!
> Thanks.

You can either use an apache rewrite rule (if you're using
apache, of course):

http://httpd.apache.org/docs/2.2/rewrite/rewrite_guide.html

Or hook HttpApplication's
BeginRequest to route the request to another file:

global.asax:

protected void Application_BeginRequest (object sender, EventArgs e)
{
        // map inexistent files to "bar.aspx"
        if (!File.Exists (Request.PhysicalPath))
                Context.RewritePath ("/appname/bar.aspx");
}

or this

protected void Application_BeginRequest (object sender, EventArgs e)
{
        map "foo.aspx" to "bar.aspx".
        if (Request.FilePath == "/appname/foo.aspx")
                Context.RewritePath ("/appname/bar.aspx");
}

Robert

_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to