I need Urgent Help with google images redirect.

Discussion in 'JavaScript' started by gian22, May 30, 2006.

  1. #1
    Hi. I have a Web site that is getting a lot of hits from google images. People are getting the images but not visiting the site. I was wondering if there was a code that will redirect anyone who tries to view the full picture on the google images ( want to redirect them to the main page). Please let me know if you know how to do this! PM me if possible.

    Thanks!
    Gian
     
    gian22, May 30, 2006 IP
  2. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Are you wanting to break out of the frameset?

    
    <script language="javascript" type="text/javascript">
    if (self != top) {
        if (document.images)
            top.location.replace(window.location.href);
        else
            top.location.href = window.location.href;
    }
    </script>
    
    Code (markup):
     
    mad4, May 30, 2006 IP
  3. gian22

    gian22 Well-Known Member

    Messages:
    360
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    123
    #3
    I to redirect users who click on the image to the front page of the site. Thank you! would that do the trick? I have to add that to the <head> ?
     
    gian22, May 30, 2006 IP
  4. gian22

    gian22 Well-Known Member

    Messages:
    360
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    123
    #4
    You did it!! Thanks a lot!! :) :) :)


     
    gian22, May 30, 2006 IP
  5. dropby23

    dropby23 Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    this is an old thread sorry to update it but i want to ask if u put this code to my footer does it influence google adsense or search engine results
     
    dropby23, Dec 16, 2007 IP