Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 09-22-2004, 10:54 PM   #1
Mr Pheer
Retired
 
Mr Pheer's Avatar
 
Industry Role:
Join Date: Dec 2002
Posts: 21,261
anti-hotlink mod_rewrite question

How do i stop people from hotlinking images, but if they link to a page with an image, have that work?

in other words, linking to a page is fine, hotlinking just the image on the page is not

this is what I have:
RewriteEngine on
RewriteCond %{http_referer} !^$
RewriteCond %{http_referer} !^http://(www\.)?mydomain.com/.*$ [NC]
rewriterule ^.*$ http://www.mrpheer.com/bdc.gif [R,L]

but its blocking everything, pages and images

help?
Mr Pheer is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-22-2004, 10:56 PM   #2
Mr Pheer
Retired
 
Mr Pheer's Avatar
 
Industry Role:
Join Date: Dec 2002
Posts: 21,261
fuckin hahah bullshit fucked up my code
Mr Pheer is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-22-2004, 10:59 PM   #3
johndoebob
Confirmed User
 
Join Date: Mar 2004
Posts: 3,405
If they hotlink images that will work.If you have images on single pages you need to redirect the referer.
__________________
johndoebob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-22-2004, 11:02 PM   #4
Lycanthrope
Confirmed User
 
Lycanthrope's Avatar
 
Industry Role:
Join Date: Jan 2004
Location: Wisconsin
Posts: 4,517
Quote:
Originally posted by MrPheer
How do i stop people from hotlinking images, but if they link to a page with an image, have that work?

in other words, linking to a page is fine, hotlinking just the image on the page is not

this is what I have:
RewriteEngine on
RewriteCond %{http_referer} !^$
RewriteCond %{http_referer} !^http://(www\.)?mydomain.com/.*$ [NC]
rewriterule ^.*$ http://www.mrpheer.com/bdc.gif [R,L]

but its blocking everything, pages and images

help?
That's because you are telling it to redirect everything... do this:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com:80.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://ipaddress.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://ipaddress:80.*$ [NC]
RewriteRule .*[Jj][Pp][Gg]$|.*[Jj][Pp][Ee][Gg]$|.*[Gg][Ii][Ff]$ redirect.url [R,L]
__________________

Last edited by Lycanthrope; 09-22-2004 at 11:04 PM..
Lycanthrope is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-22-2004, 11:39 PM   #5
Mr Pheer
Retired
 
Mr Pheer's Avatar
 
Industry Role:
Join Date: Dec 2002
Posts: 21,261
having some problems because my gallery script doesnt serve the images as gif or jpg, it serves them like ?p000001111 or some other numbers
Mr Pheer is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.