This project is read-only.

Unable to rewrite URL to point to a page

Topics: ASP.NET 2.0
Jun 27, 2008 at 8:23 AM
I have a page called Downloads. It can be accessed at I want to be able to let people access it at to maintain compatibility with existing links. Unfortunately the code that I wrote to do this in Global.asax doesn't succeed in redirecting the URL:-

void Application_BeginRequest(object sender, EventArgs e)


    string path = Request.Url.ToString().ToUpperInvariant();

    if (path.EndsWith("/DOWNLOADS.ASPX") && !path.EndsWith("/PAGE/DOWNLOADS.ASPX"))



It gives a 404 because obviously isn't a real address and is itself rewritten somehow.

How can I redirect the request to something that will work with BlogEngine ?