Activity Stream
48,167 MEMBERS
61962 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1.     
    #1
    Member

    Exclamation No image hotlinking - can't get it to work

    Hi, i want to block image hotlinking from my website.
    I found instructions on how to do it and i edited the .htaccess file but it's not working. Here is what i added:

    Code: 
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mywebsite.com [NC]
    RewriteRule \.(jpg|jpeg|png|gif)$ http://external_image_to_show_instead [NC,R,L]
    I tried to open a support ticket to KnownSRV but all i got was:
    Code looks ok. However, I'm not sure why it doesn't work for you.


    So, i'll need your help here
    Cyberbob Reviewed by Cyberbob on . No image hotlinking - can't get it to work Hi, i want to block image hotlinking from my website. I found instructions on how to do it and i edited the .htaccess file but it's not working. Here is what i added: RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mywebsite.com RewriteRule \.(jpg|jpeg|png|gif)$ http://external_image_to_show_instead I tried to open a support ticket to KnownSRV but all i got was: :facepalm: Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Pure Awesomeness!
    Try and change the part where it says mywebsite.com to your domain? and external_image_to_show_instead to the url of the image u wanna show instead.



  4.     
    #3
    Member
    Yes i did change the url of the website and the image i just didn't want to show it

  5.     
    #4
    Pure Awesomeness!
    I tried on my blog and it didn't prevent anything, imma try and look for another code, if you found a working one, post it here .



  6.     
    #5
    Member
    Thanks Mr-R-T, i'll keep looking for another code
    If someone knows another way, let us know

  7.     
    #6
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Try this, may work:

    Code: 
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
    RewriteCond %{HTTP_REFERER} !^$
    RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://myimageurlheretoshownotavailable.com [L]
    http://myimageurlheretoshownotavailable.com - Thats the image you want to show on other website if hotlinked

  8.     
    #7
    Member
    @soft2050, it's also not working

  9.     
    #8
    Respected Member
    You probably are using ngnix.

    Try this:
    valid_referers blocked www.mydomain.com mydomain.com;
    if ($invalid_referer) {
    rewrite ^/wp-content/uploads.*\.(gif|jpg|jpeg|png)$ http://www.mydomain.com/wp-content/banners/Banner3.jpg last
    }
    if(!-e){
    rewrite ^(.*)$ /index.php last
    }
    or this for hotlinking all files.
    location ~* (\.jpg|\.png|\.css)$ {
    valid_referers blocked mydomain.com www.mydomain.com;
    if ($invalid_referer) {
    return 444;
    }
    }

  10.     
    #9
    Member
    @Lock Down, i wanted this to work, but still nothing.
    At .htaccess file there is also some code from wordpress:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress
    I tried to put every code at both above and beyond wordpress code but it didn't work.

  11.     
    #10
    Respected Member
    Are you using ngnix?

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Looking For Image Host Allows Adult & Hotlinking
    By DJboutit in forum File Host Discussion
    Replies: 13
    Last Post: 26th Sep 2011, 02:07 PM
  2. reliable image host with hotlinking
    By incognito in forum Webmaster Discussion
    Replies: 4
    Last Post: 8th Sep 2010, 12:05 PM
  3. Best free image host (hotlinking allowed)
    By shadeslader in forum General Discussion
    Replies: 20
    Last Post: 19th Apr 2010, 11:44 PM
  4. stop image hijacking (anti-hotlinking) Lighttpd
    By jessepure in forum Server Management
    Replies: 4
    Last Post: 16th Jan 2010, 12:19 PM
  5. Prevent Image Hotlinking
    By Whoo in forum Webmaster Resources
    Replies: 6
    Last Post: 23rd Sep 2008, 05:14 PM

Tags for this Thread

BE SOCIAL