Copy link to clipboard
Copied
I am trying to get the url a redirection link ends up at.
for example:
I have the link http://click.linksynergy.com/fs-bin/click?id=GkG6Y9Pa6vo&offerid=50252.10000079&type=3&subid=0
I want to get the value us.mcafee.com
I have unsuccesfully tried cfhttp get and iframe.
Any suggstions?
Copy link to clipboard
Copied
Hmm, you mean this link then redirects onto another URL? Like TinyURL would?
I don't know if there is a way to do that. I think cfhttp only returns info on the request you make, therefore, the request is the page that redirects.
Interesting problem though. Maybe someone with more brains than me can help you solve it.
Mikey.
Copy link to clipboard
Copied
Have you tried specifying the attribute redirect="no" in your CFHTTP tag, then looking at the value of cfhttp.responseHeader.Location?
See related forum post:
http://forums.adobe.com/message/984049
Copy link to clipboard
Copied
Thanks for the quick replies.
I tried cfhttp with redirect="no" with cfhttp.responseHeader.Location and that worked!
Unfortunately, the domain is shows is clinic.mcafee.com not the final destination of us.mcafee.com, it seems there is a redirect on that link as well .. so I am working with a link that redirects to a redirect link ...I guess I will have to find a way to loop the process.
Thanks again!
Copy link to clipboard
Copied
Yags5100 wrote:
so I am working with a link that redirects to a redirect link ...I guess I will have to find a way to loop the process.
Not an unusual situation. Should not be two hard to loop the process. Just get the URL from the responseHeader.location field and apply another <cfhttp...> call. Do so until you get a non 30x for that http status.
Copy link to clipboard
Copied
Thanks! This works great!