Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Mikel30

macrumors member
Original poster
Jan 11, 2004
89
24
I'm trying to write an Applescript, but I'm not quire sure how to do it. Basically, there's a web page that I want to keep checking on. It's not live yet, and I want to find out when it's up.

The tricky part is that the webpage redirects if it isn't up yet, so I can't simply reload the page. I want the Applescript to go to the webpage, check to see if it got redirected somewhere else, and if so, load it again. So I need to check to see what page it's currently at, and that's what I can't figure out.
 

balamw

Moderator emeritus
Aug 16, 2005
19,366
979
New England
IIRC curl (http://curl.haxx.se/docs/manpage.html) won't follow redirects unless you tell it to. It also seems like you can ask it to output how many redirects it was asked to follow in case it does.

EDIT: I just checked this on a site I have registered, but not yet set up hosting for. curl http://parkedsite.com gives no output, while curl -L http://parkedsite.com gives me the Network Solutions "Coming Soon" page.

B
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.