View Single Post
Old 04-10-2007, 02:20 PM  
NinjaSteve
Too lazy to set a custom title
 
Industry Role:
Join Date: Dec 2003
Posts: 11,089
Quote:
Originally Posted by fuzebox View Post
I wrote this for my domains, better than just using frame breaking code imo.

1) Create a file in your root called googleimages.php:

<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) Stick this in your .htaccess:

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


I <3 you in a not so gay way.
__________________
...
NinjaSteve is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote