Re: server.transfer in ASP
- From: Big Bill <kruse@xxxxxxxxxxxxxxx>
- Date: Wed, 19 Apr 2006 19:53:18 GMT
On Wed, 19 Apr 2006 15:30:52 -0400, Harlan Messinger
<hmessinger.removethis@xxxxxxxxxxx> wrote:
Big Bill wrote:
Can I use this to do a canonical 301 redirect on an IIS server, the
non-www. to the www version of a site?
My understanding, which we all know is limited, has been that you had
to do this
Server.Transfer doesn't produce a redirection. It causes the server to
cease execution of the current ASP page and to use the ASP page
specified as its argument to generate the rest of the response, which is
then sent to the client in the usual manner. It's an internal detail and
the client knows nothing about it. As far as the client is concerned,
the response was produced by the resource originally requested.
"On IIS you must create a new site and redirect it permanently to the
canonical server name in order to make this work. Don't forget to pass
the URL segments path, query string, and fragment identifier. "
That's a 301 response:
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", redirectionURL
Response.End
Heh-heh. Was that a yes or a no, Harlan?
BB (still scratching head)
--
http://www.kruse.co.uk/sandbox.htm
http://www.here-be-posters.co.uk/erotic-photography.htm
http://www.crystal-liaison.com/caithness-glass/index.html
.
- Follow-Ups:
- Re: server.transfer in ASP
- From: Harlan Messinger
- Re: server.transfer in ASP
- References:
- server.transfer in ASP
- From: Big Bill
- Re: server.transfer in ASP
- From: Harlan Messinger
- server.transfer in ASP
- Prev by Date: Re: I truly hope to send many visitors your way.
- Next by Date: Re: Question on Statcounter.com
- Previous by thread: Re: server.transfer in ASP
- Next by thread: Re: server.transfer in ASP
- Index(es):
Relevant Pages
|