Forum Moderators: phranque

Message Too Old, No Replies

What's on the page that redirects

         

bob91325

5:28 pm on Jul 30, 2003 (gmt 0)

10+ Year Member



I want to know if there are any way(s) to see what is on the page of a page the instantly (server side) redirects to a new page. For example, when I go to www.mysite.com it redirects me to www.mysite.com/index.html. Is there a way to see what is on www.mysite.com. Any help is greatly appreciated. Thanks.

dmorison

5:34 pm on Jul 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you're using Windows, go to a command prompt and type:

telnet www.mysite.com 80

The page should go blank. Now type in:

GET / HTTP/1.1<return>
Host: www.mysite.com<return>
<return>

You should then see the raw response from that request.

dingman

5:46 pm on Jul 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You might be able to get it by sniffing the network traffic while you browse - there's a program called 'ethereal' that provides a friendly way to do this, though you'd see raw HTML, not the rendered page.

It's worth noting that depending on what you mean by a "redirect", there might not *be* another page. For example, I have sites where [domain.com...] in fact displays a file which can also be accessed as [domain.com...] There is not any re-direction of the browser to a different URL in that display, it is merely the case that Apache is configured to provide the content in 'index.php' as the directory index, if the file exists.

On the other hand, if the server is in fact sending a 3xx status and a 'Location:' header, there *should*, according to the standard [w3.org], be a document body as well. None of the browsers I know of display the document in a redirect response, so to get that body you really would need to sniff the network traffic. There may be an add-on tool for Mozilla if you aren't interested in learning to use a sniffer.

<edit>Dmorrison was too fast for me. The telnet trick works, too, I've just stopped using it much 'cause I like to see the headers the browser sent, too.</eddit>

bob91325

7:18 pm on Jul 30, 2003 (gmt 0)

10+ Year Member



Thanks you both for the great suggestions. dingman, your method seemed a little too indepth for the amount of time I have to spend looking into this issue, but my IT friend said that is a good way to do it. I used the command prompt and typed in telnet www.mysite.com 80. It turns out that the site is using VBscript to redirect to the new page. Anyway, thanks again for the great advice.