Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Finding a redirect's URL

by blakem (Monsignor)
on Nov 24, 2001 at 09:57 UTC ( [id://127233]=note: print w/replies, xml ) Need Help??


in reply to Re: Finding a redirect's URL
in thread Finding a redirect's URL

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://127233]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-20 01:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found