| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Expert | Hi everyone, One of my site is getting lots of traffic from Google Images but most of people just hit the "See full-size image" which eats up my bandwidth without any site exposure. Is there anyway to take them to picture page instead of just the picture link by some type of redirect? Any help is appreciated. Thanks |
| |
| | #2 (permalink) |
| NPQ's PA, Slave, and On Call Coder Technical Services | .htaccess Code: # would redirect 'someimage.jpg', to 'someimage.html'
# just play around with it, or maybe someone will
# come up with a better way :)
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^google\.com$ [NC]
RewriteRule ^(.*)\.(jpg|jpeg|gif|png|bmp)$ /$1.html [L]
__________________ |
| |
| | #3 (permalink) |
| You are here: X | If your *NOT* running ads in an iframe (adsense), you can use javascript to break out of the google frame and leave your visitor at the thumbnail page. Code: if (window != top) top.location.href = location.href; Code: RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com/.*$ [NC]
RewriteRule \.(gif|jpg|png)$ http://www.example.com/thumbs.php?img=%{SCRIPT_FILENAME}% [R,L]
|
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |