images and httacces i think...

Discussion in 'Site & Server Administration' started by bengolden, Jan 14, 2011.

  1. #1
    hi to all,
    i want to know if it`s possible and how to do it:
    If you have one website with images and you want those images to appear in google images for example but you don t want the image to appear with img scr on another website,blog,etc and when somebody is trying to put an img scr to the

    sitename/galery/image.1 jpg instead of putting and displaying the image,only to be visible link so user get to the gallery.

    This is possible to be done and how?And if it`s done google images or images search directories will be able to display the pictures in the directories?
    From what i readed i think it haves something to do with .htacces but if i m wrong you can share your experience and give an solution.
     
    bengolden, Jan 14, 2011 IP
  2. Natcoweb

    Natcoweb Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hello,

    you will need hotlink protection, can't post the link but google for hotlink-protection at htaccesstoolsdotcom.

    Hope this will help.
     
    Natcoweb, Jan 14, 2011 IP
  3. bishopx

    bishopx Well-Known Member

    Messages:
    107
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #3
    put this into .htaccess in your directory with images:
    
    RewriteEngine on                       
    RewriteCond %{HTTP_REFERER} !^$     [NC]
    RewriteCond %{HTTP_REFERER} !^.*(google).*$     [NC]          
    RewriteCond %{HTTP_REFERER} !^.*(bing).*$     [NC]
    RewriteCond %{HTTP_REFERER} !^.*(yahoo).*$     [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourwebsite.com(/)?.*$     [NC]
    RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://yourwebsite.com/images/nohotlink.gif [R,NC]
    Code (markup):
    Replace yourwebsite.com with your domain
    It should allow google,bing,yahoo,
     
    bishopx, Jan 15, 2011 IP
  4. bengolden

    bengolden Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thannks very much i will try it.
     
    bengolden, Jan 26, 2011 IP
  5. bengolden

    bengolden Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    One more questions in here : yourwebsite.com/images/nohotlink.gif normaly when somebody will try to put an photo from my website,he will dispaly an image that will be nohotlink.gif corect?
    And that nohotlink.gif can be an image clickable with an link under it so when user click on it to acess the sitename.com ?
    And if the stealer of the bandwith if it will display that nohotlink.gif it will not steal anymore no bandwith when it will display that on his website?!

    Thanks very much mate.
     
    bengolden, Jan 26, 2011 IP
  6. bishopx

    bishopx Well-Known Member

    Messages:
    107
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #6
    Correct

    No, it's only image.

    He will steal only that much traffic, as your size of nohotlink.gif
     
    bishopx, Jan 28, 2011 IP
  7. bengolden

    bengolden Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I understand thanks very much!
    That image,or something an text instead of an image but clickable cannot be puted via .htaccess?And if anybody knows,how?!...Thanks..
     
    bengolden, Feb 7, 2011 IP