Redirecting to another page

K

KAMAL

Hi all,
I have one doubt that how some web sites will rediect from one page
to another page with out displaying the redirecting pages in the url .

for example:
Redirecting from one page to another page we have to use
http://www.somesite.com/login/register.aspx
some other sites will use like this
http://www.somesite.com/login/dsf323assd
In second one there is no extension to redirect to another page, often it
redirects .I am just saying the example.
How the second format is used to redirect from one page to another page is
it possible in .net 2003. if yes pls help me in doing that.

Thanks in advance.

Regards,
kamal.
 
6

6doughnuts

Not sure exactly what you're asking for here, but basically there are
two ways to redirect. Response.Redirect() will cause IIS to tell the
client to go somewhere else (HTTP 30x response). This will terminate
the current request and prompt the client browser to make a new request
to the specified URL. The new URL will appear in the browsers Address
bar.

The second way is to use Server.Transfer(). This transfers the current
request to another page or handler, optionally preserving the full
state of the request. The client will never know this happened, and
will still see the original URL in the browser. However, the target of
the transfer must be on the same server.

As for URLs with no file extension... this can be done by mapping
HttpHandlers (or HttpModules maybe) to certain paths in a site. The
extra stuff on the URL can then be parsed out and used like parameters
by the handler if that's what you want to do.

Hope this helps,
Matt
 
K

KAMAL

Hi Matt,
Thank u. URL mapping is very is Tom cat. Is it difficult in .net or
an easy to do it with HttpHandlers.

Regards,
Kamal.
 
6

6doughnuts

A basic HttpHandler is pretty easy to implement in .Net, but it must be
configured in web.config and IIS before it will work (in .Net 1.1,
anyway). Check out MSDN for details on how to implement it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top