• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

How to get the URL of the page which redirected to our site ?

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I have a small question here. My problem is to fetch the URL of the page which redirected to our site. Suppose, say there is a site www.abc.com, which has a link to www.xyz.com. Andif any one clicks on that link in the abc's site, then it will re-direct to xyz. But without directly getting any inputs from abc, how can the site xyz fetch the url of abc(the site which re-directed to xyz).

Is there any way to do this ?

Note : Both sites are deployed in totally different servers.
 
Ranch Hand
Posts: 212
Eclipse IDE Spring Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can obtain that value from the Referer header
 
Vinodh Sa
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sudhir nim wrote:You can obtain that value from the Referer header



Thanks Sudhir !!!
I will try the same and will revert you.....
 
Sheriff
Posts: 67754
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Be aware that this header may not always be set.
 
Vinodh Sa
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Be aware that this header may not always be set.



Hi Bibeault,

Is there any other possible way to achieve the same, which is more reliable ? Because i would need a more reliable approach.

 
Bear Bibeault
Sheriff
Posts: 67754
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, afraid not. The most reliable way is for the redirecting site to provide you with that info. Failing that, there is no 100% guaranteed means.
 
Vinodh Sa
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:No, afraid not. The most reliable way is for the redirecting site to provide you with that info. Failing that, there is no 100% guaranteed means.



Ok... But currently that redirecting site cannot provide me that info. So i have to go with the above approach only, even though its not 100% reliable. Later i will change my approach after getting the info from the redirecting site.

But THANKS anyway Bibeault
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic