GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Redirecting ALL image traffic...how to? (https://gfy.com/showthread.php?t=723670)

Jace 04-12-2007 05:25 PM

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 04-12-2007 06:11 PM

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.

JD 04-12-2007 06:23 PM

Quote:

Originally Posted by fuzebox (Post 12244889)
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

Jace 04-12-2007 06:31 PM

Quote:

Originally Posted by fuzebox (Post 12244889)
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

Jace 04-12-2007 06:36 PM

Quote:

Originally Posted by fuzebox (Post 12244889)
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?

Jace 04-12-2007 06:37 PM

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

Jace 04-12-2007 06:44 PM

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

JD 04-12-2007 06:48 PM

Quote:

Originally Posted by Jace (Post 12245009)
weird, doesn't seem to work with http://images.ask.com/

does ask mask the referrer?

Jace 04-12-2007 07:04 PM

Quote:

Originally Posted by SPeRMiNaToR (Post 12245029)
does ask mask the referrer?

not that I can tell, comes through as images.ask.com on my stats

starpimps 04-13-2007 01:50 AM

fuzebox to the rescue!!
thanks =)
very useful.

V_RocKs 04-13-2007 02:43 AM

and you did add to the list of conditions:
Code:

RewriteCond &#37;{HTTP_REFERER} ^http://images.ask


All times are GMT -7. The time now is 08:00 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123