Rewrite URL
Messages   Related Types
This message was discovered on ASPFriends.com 'aspnghttphandlers' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Holland, Bryan
I remember a presentation about HTTP Runtime capabilities and the speaker
mentioned the capability of rewriting URLs. I have dug through all of the
Release documentation and I am not sure how best to do this. Any pointers?

I thought I could create a HTTPHandler for all file types, but can I access
AND modify the HttpContext?

Bryan

Reply to this message...
 
    
David Staheli
Rewriting the URL works better in an HttpModule, before the request is
executed. That way, you can rewrite the URL to point to any file you
want, and the appropriate HttpHandler (depending on the file extension,
etc.) is then executed to process the request. Following is an example
of the method call:

    HttpContext.Current.RewritePath(newUrl);

-----Original Message-----
From: Holland, Bryan [mailto:Click here to reveal e-mail address]=20
Sent: Tuesday, January 29, 2002 5:32 AM
To: aspnghttphandlers
Subject: [aspnghttphandlers] Rewrite URL

I remember a presentation about HTTP Runtime capabilities and the
speaker
mentioned the capability of rewriting URLs. I have dug through all of
the
Release documentation and I am not sure how best to do this. Any
pointers?

I thought I could create a HTTPHandler for all file types, but can I
access
AND modify the HttpContext?

Bryan

| [aspnghttphandlers] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspnghttphandlers.asp =3D JOIN/QUIT
| http://www.asplists.com/search =3D SEARCH Archives

Reply to this message...
 
    
Scott Watermasysk (VIP)
Use the Request Objects ReWritePath method.

I have used this in my Application_BeginRequest event in the Global.asax
file.

-Scott

-----Original Message-----
From: Holland, Bryan [mailto:Click here to reveal e-mail address]
Sent: Tuesday, January 29, 2002 8:32 AM
To: aspnghttphandlers
Subject: [aspnghttphandlers] Rewrite URL

I remember a presentation about HTTP Runtime capabilities and the speaker
mentioned the capability of rewriting URLs. I have dug through all of the
Release documentation and I am not sure how best to do this. Any pointers?

I thought I could create a HTTPHandler for all file types, but can I access
AND modify the HttpContext?

Bryan

| [aspnghttphandlers] member Click here to reveal e-mail address =
| YOUR ID http://www.asplists.com/asplists/aspnghttphandlers.asp =
| JOIN/QUIT http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
 
System.Web.HttpContext




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com