![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Dec 2001
Location: Vancouver, Canada
Posts: 480
|
Hotlinking Prevention?
Hi guys,
Can someone please tell me how to prevent people hotlinking to my images using .htaccess? Thanks! ------------------ Snazzy SnazzyTGP.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Nov 2001
Location: Southfield, MI
Posts: 9,812
|
I'm not one of them but there ought to be a hundred guys in here that can help you with this one! I know how to do it on a Windows server and have it setup on some of the Linux servers we have but I wasn't the one that actually configured the .htaccess file. Hopefully they can do better then "format c:" and give you a quick answer!!! I know it can be done.
Brad |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
So Fucking Banned
Join Date: Jan 2002
Location: Hanging by the neck until dead.
Posts: 4,660
|
Have you tried format c: ?
[This message has been edited by twistyneck (edited 01-19-2002).] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Super Mario
Industry Role:
Join Date: Nov 2001
Location: Swenson's Avatar
Posts: 19,481
|
This is a sample that someone once gave me...
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> ErrorDocument 404 http://www.yourdomain.com/ ErrorDocument 403 http://www.yourdomain.com/ AuthUserFile /dev/null AuthGroupFile /dev/null RewriteEngine On ErrorDocument 404 http://www.yourdomain.com/ ErrorDocument 403 http://www.yourdomain.com/ RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yourdomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yournumericip/.*$ [NC] RewriteRule .*\.gif*$ - [F] RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yourdomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yournumericip/.*$ [NC] RewriteRule .*\.JPG*$ - [F] RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yourdomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yournumericip/.*$ [NC] RewriteRule .*\.jpg*$ - [F] RewriteCond %{HTTP_REFERER} ^http://.*np.r-18.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://203.138.134.108 [OR] RewriteCond %{HTTP_REFERER} ^http://210.150.173.167 [OR] RewriteCond %{HTTP_REFERER} ^http://210.136.157.163 [OR] RewriteCond %{HTTP_REFERER} ^http://*.exe.*$ RewriteRule \*$ http://www.yourdomain.com/ [R,L] RewriteCond %{HTTP_USER_AGENT} ^DISCo\Pump.* [OR] RewriteCond %{HTTP_USER_AGENT} ^Drip.* [OR] RewriteCond %{HTTP_USER_AGENT} ^EirGrabber.* [OR] RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro.* [OR] RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE.* [OR] RewriteCond %{HTTP_USER_AGENT} ^FlashGet.* [OR] RewriteCond %{HTTP_USER_AGENT} ^GetRight.* [OR] RewriteCond %{HTTP_USER_AGENT} ^Gets.* [OR] RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla.* [OR] RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It.* [OR] RewriteCond %{HTTP_USER_AGENT} ^Grafula.* [OR] RewriteCond %{HTTP_USER_AGENT} ^IBrowse.* [OR] RewriteCond %{HTTP_USER_AGENT} ^InterGET.* [OR] RewriteCond %{HTTP_USER_AGENT} ^Internet\Ninja.* [OR] RewriteCond %{HTTP_USER_AGENT} ^JetCar.* [OR] RewriteCond %{HTTP_USER_AGENT} ^JustView.* [OR] RewriteCond %{HTTP_USER_AGENT} ^MIDown\tool.* [OR] RewriteCond %{HTTP_USER_AGENT} ^Mister\PiX.* [OR] RewriteCond %{HTTP_USER_AGENT} ^NearSite.* [OR] RewriteCond %{HTTP_USER_AGENT} ^NetSpider.* [OR] RewriteCond %{HTTP_USER_AGENT} ^Offline\Explorer.* [OR] RewriteCond %{HTTP_USER_AGENT} ^PageGrabber.* [OR] RewriteCond %{HTTP_USER_AGENT} ^Papa\Foto.* [OR] RewriteCond %{HTTP_USER_AGENT} ^Pockey.* [OR] RewriteCond %{HTTP_USER_AGENT} ^ReGet.* [OR] RewriteCond %{HTTP_USER_AGENT} ^Slurp.* [OR] RewriteCond %{HTTP_USER_AGENT} ^SpaceBison.* [OR] RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP.* [OR] RewriteCond %{HTTP_USER_AGENT} ^Teleport.* [OR] RewriteCond %{HTTP_USER_AGENT} ^WebAuto.* [OR] RewriteCond %{HTTP_USER_AGENT} ^WebCopier.* [OR] RewriteCond %{HTTP_USER_AGENT} ^WebFetch.* [OR] RewriteCond %{HTTP_USER_AGENT} ^WebReaper.* [OR] RewriteCond %{HTTP_USER_AGENT} ^WebSauger.* [OR] RewriteCond %{HTTP_USER_AGENT} ^WebStripper.* [OR] RewriteCond %{HTTP_USER_AGENT} ^WebWhacker.* [OR] RewriteCond %{HTTP_USER_AGENT} ^WebZIP.* [OR] RewriteCond %{HTTP_USER_AGENT} ^Web\Image\Collector.* [OR] RewriteCond %{HTTP_USER_AGENT} ^Web\Sucker.* [OR] RewriteCond %{HTTP_USER_AGENT} ^Webster.* [OR] RewriteCond %{HTTP_USER_AGENT} ^Wget.* [OR] RewriteCond %{HTTP_USER_AGENT} ^eCatch.* [OR] RewriteCond %{HTTP_USER_AGENT} ^ia_archiver.* [OR] RewriteCond %{HTTP_USER_AGENT} ^lftp.* [OR] RewriteCond %{HTTP_USER_AGENT} ^tAkeOut.* RewriteRule .*\.jpg*$ http://www.yourdomain.com/ [R,L] RewriteCond %{HTTP_REFERER} ^http://.*adfilter.com.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://207.198.147.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://www.neocities.* [OR] RewriteCond %{HTTP_REFERER} ^http://chat.passagen.s.* [OR] RewriteCond %{HTTP_REFERER} ^http://volpi.sti.com.* [OR] RewriteCond %{HTTP_REFERER} ^http://batepapo0.uol.com.* [OR] RewriteCond %{HTTP_REFERER} ^http://batepapo1.uol.com.* [OR] RewriteCond %{HTTP_REFERER} ^http://batepapo2.uol.com.* [OR] RewriteCond %{HTTP_REFERER} ^http://batepapo3.uol.com.* [OR] RewriteCond %{HTTP_REFERER} ^http://batepapo4.uol.com.* [OR] RewriteCond %{HTTP_REFERER} ^http://batepapo6.uol.com.* [OR] RewriteCond %{HTTP_REFERER} ^http://batepapo7.uol.com.* [OR] RewriteCond %{HTTP_REFERER} ^http://209.2.137.* [OR] RewriteCond %{HTTP_REFERER} ^http://207.126.121.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://.*bianca.com/.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://.*angelfire.com/.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://.*hotmail.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://.*yahoo.com.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://.*geocities.com.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://www.partyhouse.*$ RewriteRule .*\.jpg*$ http://www.yourdomain.com/ [R,L] Hope this helps.... ![]() turbo ------------------ Last Chance Inn & Saloon Liquor In The Front Poker In The Rear!! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Nov 2001
Location: Southfield, MI
Posts: 9,812
|
Hat's off Turbo
-It's refreshing to see really good questions answered in sometimes!! :-) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Dec 2001
Location: Vancouver, Canada
Posts: 480
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Jan 2002
Location: Where the old people can't vote
Posts: 168
|
*Bows down to Turbo*
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Super Mario
Industry Role:
Join Date: Nov 2001
Location: Swenson's Avatar
Posts: 19,481
|
*blushes*
no problem. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Join Date: Dec 2001
Posts: 4,513
|
Check out the script at http://www.custom-cgi.com/free/bandwidth_protector/
Looks like it could do the trick and give you some free advertising at the same time.. When someone tries hotlinking, it sends a .gif or html file that you determine instead of the pic/s they are trying to link to. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Join Date: Dec 2001
Location: Vancouver, Canada
Posts: 480
|
Turbo,
That .htaccess you posted worked beautifully, thankyou! Try to access this image: http://www.snazzytgp.com/galleries/l...s/sd052_01.jpg ![]() ------------------ Snazzy SnazzyTGP.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Join Date: Jan 2001
Posts: 3,539
|
excellent Turbo,
now can anyone explain it to me? there's a lot of shit in there and i wouldn't mind understanding all of it. also, just looking at it quickly it seems to me that u can optimize the gif/JPG/jpg part. notice that the GIF part is missing too. ------------------ HQ Daily Nude Trade Traffic w/HQ Eraser Cash Oliver Klozov Amateur Pages |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Confirmed User
Join Date: Dec 2001
Location: Vancouver, Canada
Posts: 480
|
Turbo,
Slight problem... When I try to enter a url, for example: http://www.snazzytgp.com/mydir/ It redirects me to my main homepage. Any ideas how to overcome this? ------------------ Snazzy SnazzyTGP.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Join Date: Jan 2001
Posts: 3,539
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 | |
Confirmed User
Join Date: Aug 2001
Posts: 474
|
Snazzy,
This is normal; in your account, people are not allowed to see directory indexes (if there's no index.htm/html file in that directory). So the file is not existing, your .htaccess gets alive and you're redirected. Brgds, Carl Quote:
------------------ CobaltWeb - High Volume Hosting - $0.70-$0.61 per GB - Plans from $13.99 per Month - No Setup Fee ---The End of Free Hosting--- |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 | |
Confirmed User
Join Date: Oct 2001
Location: LA
Posts: 162
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 | |
Guest
Posts: n/a
|
Quote:
------------------ ![]() |
|
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 |
Confirmed User
Join Date: Jan 2001
Posts: 3,539
|
i can also access http://www.snazzytgp.com/galleries/l.../sd052_01.jpg.
let's see if gfy can: ![]() btw, can any explain me details about the .htaccess codes above? ------------------ HQ Daily Nude Trade Traffic w/HQ Eraser Cash Oliver Klozov Amateur Pages |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 |
Confirmed User
Join Date: Jan 2001
Location: LV Nev
Posts: 467
|
Snazzy,
This will get you what you need and isn't as long. ErrorDocument 400 http://www.yourdomain.com ErrorDocument 401 http://www.yourdomain.com ErrorDocument 403 http://www.yourdomain.com ErrorDocument 404 http://www.yourdomain.com ErrorDocument 410 http://www.yourdomain.com ErrorDocument 500 http://www.yourdomain.com RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://yourdomain.com.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com.*$ [NC] RewriteRule .*\.(gif|GIF|jpg|JPG|zip|ZIP|png|PNG|swf|SWF)$ - [F] Also you can add another line like this RewriteCond %{HTTP_REFERER} !^http://youripnumber.*$ [NC] But instead of yourdomain.com put in your ip number just in case anyone is trying to access it through you ip number. Name the file .htaccess in text format but without the txt extension. Upload in what ever directory you need it to work for. It works downward, meaning if you were to upload it to your root directory it will protect all the subdirectories as well. Good luck ------------------ http://www.lostbush.com/sub.html High conversion Cheerleader Fetish |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 |
OU812
Join Date: Feb 2001
Location: California
Posts: 12,651
|
Here's another one that works very well for me. Use ammo325 directions..
AuthUserFile /dev/null AuthGroupFile /dev/null AddHandler server-parsed .html RewriteEngine On RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yourdomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com:80/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yourdomain.com:80/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://999.999.999.999/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://999.999.999.999:80/.*$ [NC] RewriteRule .*\.jpg$ http://www.were-to-send-them.com [R,L] RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yourdomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com:80/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yourdomain.com:80/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://999.999.999.999/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://999.999.999.999:80/.*$ [NC] RewriteRule .*\.gif$ http://www.yourdomain.com [R,L] ErrorDocument 404 http://www.were-to-send-them.com Above are just for .jpg and .gif, if you have movie page then change the .jpg or .gif to what ever Forgot make sure you use ASCII when FTP'ing or you will screw it up.. Jim [This message has been edited by jimmyf (edited 01-21-2002).] [This message has been edited by jimmyf (edited 01-21-2002).] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 |
Confirmed User
Join Date: Jan 2001
Posts: 3,539
|
yeah i thought it could be more optimized.
this line can be optimized more too, to handle every case like these: (jpg, JPG, Jpg, and whatever else): RewriteRule .*\.(gif|GIF|jpg|JPG|zip|ZIP|png|PNG|swf|SWF)$ - [F] ------------------ HQ Daily Nude Trade Traffic w/HQ Eraser Cash Oliver Klozov Amateur Pages |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#21 |
Confirmed User
Join Date: Dec 2001
Location: Vancouver, Canada
Posts: 480
|
Okay well all of these scripts do work properly almost, but whenever I try to access an html file from somewhere lets say:
http://www.snazzytgp.com/galleries/latina/index.html it automatically redirects to my homepage. What line of code do I need to put in to stop that from happening? ------------------ Snazzy SnazzyTGP.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#22 |
Confirmed User
Join Date: Dec 2001
Location: Vancouver, Canada
Posts: 480
|
Yeah these .htaccess files that have been posted work great, except when you try to access .html files from within my /galleries/ directory. As soon as you do, it automatically redirects the visitor to my homepage.
Is there anyway to protect my images but at the same time allowing .html pages to be seen? ------------------ Snazzy SnazzyTGP.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#23 |
Confirmed User
Join Date: Dec 2001
Location: Vancouver, Canada
Posts: 480
|
bump!
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#24 |
Confirmed User
Industry Role:
Join Date: Feb 2001
Posts: 3,963
|
Thanks HQ that was gonna be my next ??
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#25 |
Confirmed User
Industry Role:
Join Date: Mar 2001
Location: Murrieta, CA
Posts: 3,620
|
Anyone know how to use the hotlink prevention but then allow specifik files to be hotlinked?
|
![]() |
![]() ![]() ![]() ![]() ![]() |