in reply to Finding a redirect's URL

I think maybe my question was a little unclear...

I do not want to MAKE a redirect, rather find out where a page is trying to redirect the user.. Also, I don't really want to be redirected, only to get the URL that I would be redirected to if I was using a browser.

Wog's comment seems like something I should look into, however, my problem is that LWP does not seem to be following a redirect. In fact, there does not seem to be a redirect in that response at all.

The browser does redirect, and the site's administrator showed me the little bit of ASP code that actually creates the redirect.
Where could this redirect be hiding? Am I missing something with LWP that is keeping me from seeing this?

Thanks,
Kbeen

Replies are listed 'Best First'.
Re: Re: Finding a redirect's URL
by blakem (Monsignor) on Nov 24, 2001 at 09:57 UTC
    LWP comes with a nifty stand alone program called GET. GET is a script that uses the LWP modules to fetch remote web pages. The following worked for me:
    % GET -Sd http://www.slashdot.org GET http://www.slashdot.org --> 301 Moved Permanently GET http://slashdot.org/ --> 200 OK
    Which shows www.slashdot.org being redirected to slashdot.org. This works fine if you just want to run a few URLs by hand. If you want to automate this functionality in a script, you can always peek under the covers of GET and emulate what its doing.

    -Blake