Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Getting final destination url of a redirect link

New Here ,
May 19, 2009 May 19, 2009

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?

1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 19, 2009 May 19, 2009

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
May 19, 2009 May 19, 2009

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 19, 2009 May 19, 2009

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 19, 2009 May 19, 2009

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 19, 2009 May 19, 2009
LATEST

Thanks!  This works great!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources