Redirecting ALL image traffic...how to?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jace
    FBOP Class Of 2013
    • Jan 2004
    • 35562

    #1

    Redirecting ALL image traffic...how to?

    so, I tried earlier and all everyone came back with was frame busters, which doesn't suit my needs

    I have tons of 404 image traffic....my blog used to be all rss feeds, I revamped it and changed the permalink structure and now I have TONS of google, ask jeeves and msn image traffic...

    how can I set my htaccess up to redirect all image traffic to my main page?

    so, when someone goes here
    http://images.ask.com/fr?q=Rate+My+P...age%253D1&qt=0
    it automatically pulls them out of the frame and to my main site....the image is from an rss feed, so when they click it they will go to it, but I wanna bust them out of the frame and to my home page, not the 404 page
  • fuzebox
    making it rain
    • Oct 2003
    • 22353

    #2
    This should work.

    1) create file called googleimages.php in your root dir

    <html><head><title>Loading Site...</title>
    <script language="Javascript">
    <!--
    if (top.location != location) top.location.href = 'http://<? print $_SERVER["SERVER_NAME"] . $url;?>';
    //-->
    </script>
    </head>
    <body><center><a target=_top href="http://<? print $_SERVER["SERVER_NAME"] . $url; ?>">Click Here To Load The Site</a></center>
    </body></html>

    2) add this to .htaccess:

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} ^http://images.google
    RewriteCond %{REQUEST_URI} !googleimages.php
    RewriteCond %{REQUEST_URI} (.*)
    RewriteRule /* /googleimages.php?url=%1 [R,L]



    You can edit the php file to send em to your root instead if you want, and of course add the other image search services to the .htaccess.

    Comment

    • JD
      Too lazy to set a custom title
      • Sep 2003
      • 22651

      #3
      Originally posted by fuzebox
      This should work.

      1) create file called googleimages.php in your root dir

      <html><head><title>Loading Site...</title>
      <script language="Javascript">
      <!--
      if (top.location != location) top.location.href = 'http://<? print $_SERVER["SERVER_NAME"] . $url;?>';
      //-->
      </script>
      </head>
      <body><center><a target=_top href="http://<? print $_SERVER["SERVER_NAME"] . $url; ?>">Click Here To Load The Site</a></center>
      </body></html>

      2) add this to .htaccess:

      RewriteEngine On
      RewriteCond &#37;{HTTP_REFERER} ^http://images.google
      RewriteCond %{REQUEST_URI} !googleimages.php
      RewriteCond %{REQUEST_URI} (.*)
      RewriteRule /* /googleimages.php?url=%1 [R,L]



      You can edit the php file to send em to your root instead if you want, and of course add the other image search services to the .htaccess.
      that works GREAT btw!

      if you want the hits to send to your main page then just change the line in googleimages.php that says http://<? print $_SERVER["SERVER_NAME"] . $url; ?> to http://www.domain.com

      edit: hit me up to see it in action
      Last edited by JD; 04-12-2007, 05:24 PM.

      Comment

      • Jace
        FBOP Class Of 2013
        • Jan 2004
        • 35562

        #4
        Originally posted by fuzebox
        This should work.

        1) create file called googleimages.php in your root dir

        <html><head><title>Loading Site...</title>
        <script language="Javascript">
        <!--
        if (top.location != location) top.location.href = 'http://<? print $_SERVER["SERVER_NAME"] . $url;?>';
        //-->
        </script>
        </head>
        <body><center><a target=_top href="http://<? print $_SERVER["SERVER_NAME"] . $url; ?>">Click Here To Load The Site</a></center>
        </body></html>

        2) add this to .htaccess:

        RewriteEngine On
        RewriteCond %{HTTP_REFERER} ^http://images.google
        RewriteCond %{REQUEST_URI} !googleimages.php
        RewriteCond %{REQUEST_URI} (.*)
        RewriteRule /* /googleimages.php?url=%1 [R,L]



        You can edit the php file to send em to your root instead if you want, and of course add the other image search services to the .htaccess.


        THANKS! I was trying to find the thread you posted this in the other day and didn't have any luck

        this is EXACTLY what I needed

        Comment

        • Jace
          FBOP Class Of 2013
          • Jan 2004
          • 35562

          #5
          Originally posted by fuzebox
          This should work.

          1) create file called googleimages.php in your root dir

          <html><head><title>Loading Site...</title>
          <script language="Javascript">
          <!--
          if (top.location != location) top.location.href = 'http://<? print $_SERVER["SERVER_NAME"] . $url;?>';
          //-->
          </script>
          </head>
          <body><center><a target=_top href="http://<? print $_SERVER["SERVER_NAME"] . $url; ?>">Click Here To Load The Site</a></center>
          </body></html>

          2) add this to .htaccess:

          RewriteEngine On
          RewriteCond %{HTTP_REFERER} ^http://images.google
          RewriteCond %{REQUEST_URI} !googleimages.php
          RewriteCond %{REQUEST_URI} (.*)
          RewriteRule /* /googleimages.php?url=%1 [R,L]



          You can edit the php file to send em to your root instead if you want, and of course add the other image search services to the .htaccess.
          btw, is there a way to make this so they don't have to click to get to the site? so it just auto redirects?

          Comment

          • Jace
            FBOP Class Of 2013
            • Jan 2004
            • 35562

            #6
            nevermind, I spoke before I tried it, it works perfectly

            Comment

            • Jace
              FBOP Class Of 2013
              • Jan 2004
              • 35562

              #7
              weird, doesn't seem to work with http://images.ask.com/

              Comment

              • JD
                Too lazy to set a custom title
                • Sep 2003
                • 22651

                #8
                Originally posted by Jace
                weird, doesn't seem to work with http://images.ask.com/
                does ask mask the referrer?

                Comment

                • Jace
                  FBOP Class Of 2013
                  • Jan 2004
                  • 35562

                  #9
                  Originally posted by SPeRMiNaToR
                  does ask mask the referrer?
                  not that I can tell, comes through as images.ask.com on my stats

                  Comment

                  • starpimps
                    Confirmed User
                    • Sep 2006
                    • 6954

                    #10
                    fuzebox to the rescue!!
                    thanks =)
                    very useful.
                    Teen Porn Models / Solo Girls

                    Comment

                    • V_RocKs
                      Damn Right I Kiss Ass!
                      • Nov 2003
                      • 32448

                      #11
                      and you did add to the list of conditions:
                      Code:
                      RewriteCond &#37;{HTTP_REFERER} ^http://images.ask
                      Last edited by V_RocKs; 04-13-2007, 01:45 AM.

                      Comment

                      Working...