Find the answer to your Linux question:
Results 1 to 5 of 5
Programming in html, how can I tell what site forwarded to my site when Google set up the dns of the forwarded site to forward to my site? I think ...
  1. #1
    Just Joined!
    Join Date
    Sep 2008
    Posts
    3

    Newbie linux html programmer needs to know how what site forwarded to my site via dns

    Programming in html, how can I tell what site forwarded to my site when Google set up the dns of the forwarded site to forward to my site? I think it has to do with zone record, but what is the html code I need to read the original site? Thanks!

  2. #2
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    I don't understand your question at all.

    I think that you're referring to the Referer HTTP header. Basically, browsers are supposed to tell you where they came from, and they do this through the Referer header.

    HTML is just a markup language, and so can't read anything or be dynamic in any way. However, any web programming language (Perl, PHP, Ruby, Python, etc.) has ways to read the headers of the request and react accordingly.
    DISTRO=Arch
    Registered Linux User #388732

  3. #3
    Just Joined!
    Join Date
    Sep 2008
    Posts
    3

    Do you know the php code to see the original url that was forwarded to my site?

    Am i being clear?

  4. #4
    Trusted Penguin elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    2,298
    I think Cabhan is right and you need the referer header. This will require a server side programming language. But be aware that you cannot rely on it being present. Some anti-virus / firewall / proxy / anonymiser software will strip it out from the HTTP header.
    If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)


    My new blog. It's probably not as good as I think it is.

  5. #5
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,114
    Do you have a service that redirects users to your site?
    User clicks whatever dot com, it goes to a server with
    a meta refresh that redirects to your address.

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title>Your Page Title</title>
    <meta http-equiv="REFRESH" content="0;url=http://www.the-domain-you-want-to-redirect-to.com"></HEAD>
    <BODY>
    Optional page text here.
    </BODY>
    </HTML>
    html redirect

    To see the code, you go to the address with meta refresh disabled on
    your browser and read the html code on the server.

    Or do you have a dynamic dns service? In that case, someone
    like dyndns has a name server and whatever dot com points to
    your IP address.

    Your question is ambiguous at best.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...