Re: What's the simplest way to do URL rewriting?
- From: Alan Silver <alan-silver@xxxxxxxxxxxx>
- Date: Thu, 23 Jun 2005 11:03:13 +0100
>The most 'basic' part is calling either overload of:
>HttpContext.Rewrite
Do you know where I can find more information about how to use it? The
SDK is pretty short on explanation.
I tried adding the following to a page ...
void Page_Load(Object sender,EventArgs e) {
//Create a 'Httpcontext' object using 'Current' property
HttpContext myContext = HttpContext.Current;
//Rewrite the internal path
myContext.RewritePath("/");
}
and loading it, but the page (which is not the site's root page) just
loaded as normal.
How would I achieve what I asked, ie allow the user to request
http://www.whatever.com/orders/123 and have this translated into
http://www.whatever.com/orders.aspx?orderid=123
>I guess the reason why most articles appear tough is because they explain
>URL Rewriting using HTTP Modules and Handlers.
Probably. That certainly made is confusing. Please could you explain how
the HttpContext.Rewrite is used without modules and handlers.
Thanks for the reply.
--
Alan Silver
(anything added below this line is nothing to do with me)
.
- Follow-Ups:
- Re: What's the simplest way to do URL rewriting?
- From: Joerg Jooss
- Re: What's the simplest way to do URL rewriting?
- From: Scott Allen
- Re: What's the simplest way to do URL rewriting?
- References:
- What's the simplest way to do URL rewriting?
- From: Alan Silver
- RE: What's the simplest way to do URL rewriting?
- From: Rakesh Rajan
- What's the simplest way to do URL rewriting?
- Prev by Date: SMTPMAIL
- Next by Date: Re: Newbie: Javascript help
- Previous by thread: RE: What's the simplest way to do URL rewriting?
- Next by thread: Re: What's the simplest way to do URL rewriting?
- Index(es):
Relevant Pages
|