Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications

Reply
 
Thread Tools
Stop Image Hotlinking! Details »»
Stop Image Hotlinking!
Version: 1.00, by dxlwebs dxlwebs is offline
Developer Last Online: Dec 2012 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.8.x Rating:
Released: 09-24-2009 Last Update: Never Installs: 18
Code Changes Additional Files  
No support by the author.

Hey all,

I thought that this might be usefull for you all its very simple and you can do it within 1 minute!

Basically all it does is stop people from hotlinking your images and using your bandwidth!

This code below allows your to stop hotlink for all sites apart from the sites you choose all you do is add this code your you .htaccess file!
Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yoursite.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domain2.com [NC]
RewriteRule .*\.(jpg|png|bmp|gif)$ http://yourdomain.com/forum/nhl.png [NC,R,L]
i have provided a image below for you to use if you would like other wise you can put your own image there, just chage the address of your site and location to your forum and add my image to your forum root and everytime some one trys to hotlink you they will only see that image!

thats it easy as pie! remember to back up your .htaccess file before editing anything!

Screenshots

File Type: png nhl.png (142.3 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 09-25-2009, 08:23 AM
FiMeTi FiMeTi is offline
 
Join Date: May 2008
Location: Germany
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well that works, but I can´t get the deny.png to show. There´s just no image or a brokenlink-img. But it blocks other websites.
Reply With Quote
  #13  
Old 09-25-2009, 08:27 AM
EidolonAH EidolonAH is offline
 
Join Date: Apr 2009
Location: London, England
Posts: 178
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by FiMeTi View Post
Well that works, but I can?t get the deny.png to show. There?s just no image or a brokenlink-img. But it blocks other websites.
can you post what you have in your .htaccess and where you put it that file, I can't get this to work myself.
Reply With Quote
  #14  
Old 09-25-2009, 08:32 AM
FiMeTi FiMeTi is offline
 
Join Date: May 2008
Location: Germany
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

At the bottom of your .htaccess file you drop in this code.
Code:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?MYDOMAIN\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/misc/deny.png [L]
But the deny image does not pop up. Neither with this code, nor with the code of dxlwebs. ;/
Reply With Quote
  #15  
Old 09-25-2009, 08:32 AM
dxlwebs dxlwebs is offline
 
Join Date: Jun 2008
Posts: 237
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

add this into your .htacces file in your forums root
Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yoursite.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domain2.com [NC]
RewriteRule .*\.(jpg|png|bmp|gif)$ http://yourdomain.com/forum/nhl.png [NC,R,L]
edit the links to your specified needs remember to put the correct links in and you must have your site url where i put yoursite.com to make sure that your sites images still show!
Reply With Quote
  #16  
Old 09-25-2009, 08:34 AM
dxlwebs dxlwebs is offline
 
Join Date: Jun 2008
Posts: 237
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by FiMeTi View Post
At the bottom of your .htaccess file you drop in this code.
Code:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?MYDOMAIN\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://yoursite.com/images/misc/deny.png [L]
But the deny image does not pop up. Neither with this code, nor with the code of dxlwebs. ;/

your forgot to put your sites domain then the image socation i etided it in the quote take a look!
Reply With Quote
  #17  
Old 09-25-2009, 08:37 AM
FiMeTi FiMeTi is offline
 
Join Date: May 2008
Location: Germany
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks mate, but I tried that surely, too. Still not working. Cache always empty before I test.
Anyway, this is still good enough.
Reply With Quote
  #18  
Old 09-25-2009, 08:40 AM
dxlwebs dxlwebs is offline
 
Join Date: Jun 2008
Posts: 237
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmmm try putting www. before your domain if not then im stumped it should work!
Reply With Quote
  #19  
Old 09-25-2009, 09:07 AM
Arcade Fire's Avatar
Arcade Fire Arcade Fire is offline
 
Join Date: May 2008
Location: Menorca, Spain
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works, but not show alternative image.

I put one smile of my forum in Post #3 of this thread, but isn't sustitute for nhl.png image.
Reply With Quote
  #20  
Old 09-25-2009, 05:58 PM
thedvs thedvs is offline
 
Join Date: May 2002
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is mine which i have used for years, works great, use .gif for the deny picture!
Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://.*websitename\.com.*$ [NC] 
RewriteCond %{REQUEST_URI}  !^.*leech\.gif$ [NC]
RewriteRule ^.*\.(swf|bmp|gif|jpg|png|jpeg|avi|wmv|mpg|mpeg|wav|mp3)$ http://www.websitename.com/leech.gif [NC,R,L]
Reply With Quote
  #21  
Old 09-26-2009, 08:09 AM
Arcade Fire's Avatar
Arcade Fire Arcade Fire is offline
 
Join Date: May 2008
Location: Menorca, Spain
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks theadvs, woks fine!.

Example wen i put a icon of my forum:

Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:17 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04402 seconds
  • Memory Usage 2,325KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete