Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

How to get a redirected url?

 [1/2] from: brett::codeconscious::com at: 23-Nov-2001 11:18


Hi Mat,
> If you have a URL that redirects somewhere, how can you tell where it > is redirecting? IE obtain the URL where you are being redirected.
Quoting Sterling: port: open http://www.abc.com/ probe port/locals/list probe port/url close port This is the list of redirected url's. There may be more than one. The list is empty if there were no redirects. The list contains al lredirected url's if there were any. The last URL read is not in the list and, as you know, can be found in port/url. So the better one-liner to see if you got redirected after an open is: empty? port/locals/list Brett.

 [2/2] from: mat:b:codeplay at: 22-Nov-2001 14:29


Hello, If you have a URL that redirects somewhere, how can you tell where it is redirecting? IE obtain the URL where you are being redirected. If you read it, Rebol will display two connecting to: entries in the console and returns the redirected page but that doesn't help the goal above. Regards, Mat Bettinson Codeplay Tel: +44 (0)20 7482 3382 140-142 Kentish Town Rd, London, NW1 9QB http://www.codeplay.com