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

Results 1 to 5 of 5
  1.     
    #1
    Member
    Website's:
    fs-ddl.com

    Default htaccess - images

    I run my site on WordPress .
    I am interested in how to forbid images hosted on my site , sharing and showing on other sites/forum ... ? Point is to save bandwitch !
    Also , i found a ton of tutorials on Google , but evan if i done like it said i think i didn't do it right ! Images are still showing ! I am making some mistake but i don't know where . Can anyone help me with this and tell what do i have to add in htaccess , where to put it , and where to put .htaccess file ?
    I have only one folder on host that i want to protect !

    Thanks !
    Dekstr Reviewed by Dekstr on . htaccess - images I run my site on WordPress . I am interested in how to forbid images hosted on my site , sharing and showing on other sites/forum ... ? Point is to save bandwitch ! Also , i found a ton of tutorials on Google , but evan if i done like it said i think i didn't do it right ! Images are still showing ! I am making some mistake but i don't know where . Can anyone help me with this and tell what do i have to add in htaccess , where to put it , and where to put .htaccess file ? I have only one Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Add this info to .htaccess

    If you want to redirect them to different image:
    Code: 
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
    RewriteCond %{HTTP_REFERER} !^$
    RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://blockedimage.jpg [L]
    http://blockedimage.jpg - link to image that should show up when hotlinked image is viewed

    Or if you just want to disallow hotlinking then:

    PHP Code: 
    RewriteEngine on
    RewriteCond 
    %{HTTP_REFERER} !^http(s)?://(www\.)?wzfak.com [NC]
    RewriteCond %{HTTP_REFERER} !^$
    RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L

  4.     
    #3
    Member
    Website's:
    fs-ddl.com
    ok this is how it looks
    Code: 
    # 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>
    
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://(.+\.)?fs-ddl\.com/ [NC]
    RewriteCond %{HTTP_REFERER} !^$
    RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://fs-ddl.com/uploads/logo.png [L]
    # END WordPress
    and this file is on public_html . no need to copy it in folder where are the image ?
    I think it is working now , but i just want to check it did i do it right this time

    edit :
    i just want to forbid to anyone to use images in for example in forum posts or anything like that !

  5.     
    #4
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Quote Originally Posted by Dekstr View Post
    ok this is how it looks
    Code: 
    # 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>
    
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://(.+\.)?fs-ddl\.com/ [NC]
    RewriteCond %{HTTP_REFERER} !^$
    RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://fs-ddl.com/uploads/logo.png [L]
    # END WordPress
    and this file is on public_html . no need to copy it in folder where are the image ?
    I think it is working now , but i just want to check it did i do it right this time

    edit :
    i just want to forbid to anyone to use images in for example in forum posts or anything like that !
    Yeah its right

    Just replace:

    PHP Code: 
    RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://fs-ddl.com/uploads/logo.png [L] 
    With:

    PHP Code: 
    RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L
    to forbid to anyone to use your images

  6.     
    #5
    Member
    Website's:
    fs-ddl.com
    i'we done it like you said . thank you for your help !!!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Broken Images overlapping New Images
    By Leeds in forum vBulletin
    Replies: 8
    Last Post: 17th Apr 2012, 08:57 PM
  2. .htaccess Help Please
    By l0calh0st in forum Web Development Area
    Replies: 3
    Last Post: 4th Apr 2011, 03:29 PM
  3. Replies: 11
    Last Post: 11th Feb 2011, 11:58 PM
  4. Htaccess
    By Ambition in forum General Discussion
    Replies: 3
    Last Post: 5th Oct 2010, 11:24 AM
  5. Images Watermarker of my Images and Upload it!!
    By Bytes in forum Completed Transactions
    Replies: 11
    Last Post: 5th Aug 2010, 11:24 AM

Tags for this Thread

BE SOCIAL