Re: server.transfer in ASP



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

.



Relevant Pages

  • Re: redirection
    ... which I output as the first code on the page... ... client cached the result of a 301 meaning that repeated requests for the ... had a 301 response for. ... varieties of query string values must not be used for redirection. ...
    (microsoft.public.scripting.vbscript)
  • Re: server.transfer in ASP
    ... 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. ... canonical server name in order to make this work. ...
    (alt.internet.search-engines)
  • Re: How to response from custom HttpHandler with "204 No Content"?
    ... http handler which sometime must send response with "204 No Content" ... This causes an error on the client. ... How to make asp not to add headers (especially Content- ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Client/Service relationships & Flow of Requirements.
    ... the client calls "foo" when it wants "bar" to return a particular value. ... The following is designed to compel Prey objects to do something: ... predator < 100 yards from prey ... It is the expectation of the response that makes the runFrom name immediately suspect in an OO context. ...
    (comp.object)
  • Re: [Full-disclosure] [Professional IT Security Providers -Exposed] PlanNetGroup ( F )
    ... the review a second time and incorporate some of your suggestions. ... to do what the client will pay him for. ... exactly a vulnerability assessment is... ... Your response to question 3: ...
    (Full-Disclosure)