• Resolved Oosten Marc

    (@onzinpiet)


    Hi,

    I hope you can help me with the following problem. I activated the hotlink protection option in the cpanel of my hosting company for my multisite network. Besides the multisite network (below named as ‘myfirstdomain’) I run another add-on domain on the same server (below named as ‘mysecondaddondomain’ which is located in a seperate directory: /public_html/mysecondaddondomain).

    I discovered that the hotlink function doesn’t work. I’ve found various site using my images and bandwidth. Most of them are blogspot blogs.

    I hope you can please help me with this to discover what I do wrong or if there are errors in the (anonymized) .htaccess file below.

    Thanks a lot for your help!

    Piet.

    This is my current .htaccess file in the /public_html directory:
    [Code moderated as per the Forum Rules. Please use the pastebin]

Viewing 15 replies - 16 through 30 (of 30 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Should, yes.

    Thread Starter Oosten Marc

    (@onzinpiet)

    Thanks Ipstenu,
    I added it below the two domains, but it didn’t work…
    Is there a way to give permission only to the translator?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Why do you need it? Google’s capable of caching the images anyway (which is NOT the same as hotlinking).

    Thread Starter Oosten Marc

    (@onzinpiet)

    You are right! Nonetheless, the code you gave me doesn’t work, what can I do?

    I added it like this:

    # Hotlink Protection
    <IfModule mod_rewrite.c>
     RewriteEngine on
     RewriteCond %{HTTP_REFERER}     !^$
     RewriteCond %{REQUEST_FILENAME} -f
     RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g?|png)$           [NC]
     RewriteCond %{HTTP_REFERER}     !^https?://([^.]+\.)?myfirstdomain\. [NC]
     RewriteCond %{HTTP_REFERER}     !^https?://([^.]+\.)?myseconddomain\. [NC]
    RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?google\. [NC]
     RewriteRule \.(gif|jpe?g?|png|bmp)$                             - [F,NC,L]
    </ifModule>
    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    One more time. WHY do you need this?

    Google doesn’t hotlink, so WHAT problem are you experiencing that makes you think THIS is the answer?

    Thread Starter Oosten Marc

    (@onzinpiet)

    Adding Google isn’t a problem for me, I only asked you a question, but my question is another: it is necessary that the images of my site are visible when someone views it with a translator.

    Like I said in the beginning, my hotlink protection works ok in .htaccess, but the Google translator doesn’t work (the images can’t be seen when translated), you suggested me:
    RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?google\. [NC]

    I added this to the .htaccess but it doesn’t work. My question is: did I put this line in the right place/position or is there another option?

    Here’s the complete current code again like I added it:

    # Hotlink Protection
    <IfModule mod_rewrite.c>
     RewriteEngine on
     RewriteCond %{HTTP_REFERER}     !^$
     RewriteCond %{REQUEST_FILENAME} -f
     RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g?|png)$           [NC]
     RewriteCond %{HTTP_REFERER}     !^https?://([^.]+\.)?myfirstdomain\. [NC]
     RewriteCond %{HTTP_REFERER}     !^https?://([^.]+\.)?myseconddomain\. [NC]
    RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?google\. [NC]
     RewriteRule \.(gif|jpe?g?|png|bmp)$                             - [F,NC,L]
    </ifModule>
    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Google translator doesn’t work (the images can’t be seen when translated)

    That will not be solved by adding them to your hotlinking exceptions list because, and please listen to this, GOOGLE DOESN’T HOTLINK. It doesn’t matter WHAT you add to .htaccess, Google isn’t hotlinking so you will NEVER be able to magically grant is access.

    I do NOT have a google exception in my htaccess and if you translate https://ipstenu.org/ oh look! Magically it works.

    So that’s NOT your problem ??

    Can you give a real URL at this point?

    Thread Starter Oosten Marc

    (@onzinpiet)

    I NEVER have said that Google does apply hotlinking!! Where did you read that?? Why do you speak to me this way?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Because you’re not understanding what you’re asking here.

    What you’re asking us is this: How do I add Google to my anti-hotlink code so that it can link directly to my images, because google translate isn’t picking up my images.

    And what I’m telling you is that because Google does NOT hotlink to your images, adding them to that code won’t fix your problem.

    Does that make sense? I get that English isn’t your first language, so I’m trying to explain this to you in different ways. What you’re doing, adding Google to your hotlink exception rules, will not, does not and can not, solve the problem of Google Translate NOT seeing your images.

    It’s not how Google works, it’s not how the code you’re using works, and it’s just a misunderstanding. Nothing more. Once you can get past that, we can look at what actually IS wrong.

    Now. Can you provide a REAL URL, not a temp one like mydomain, so we can see what’s not working?

    Thread Starter Oosten Marc

    (@onzinpiet)

    I looked at your site and please take notice that it doesn’t work for you neither!! Load your site with the translation and at first (the homepage) your images are visible, but when you open a single post, the images of that post aren’t visible neither (the same thing that happens to me). Check your posts.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I did. It works fine. See a screenshot: https://imageshack.us/photo/my-images/705/translatef.jpg/

    What browser are you using?

    Thread Starter Oosten Marc

    (@onzinpiet)

    The first entry of your site works, but not all the entries. Check out your other/older entries. Sometimes the images of your entries are visible in the translator and sometimes they ain’t.

    I tried it in Firefox and IExplorer (latest versions).

    I added some screenshots of the second page of your site:

    https://imageshack.us/photo/my-images/204/25050833.jpg/

    https://imageshack.us/photo/my-images/225/41545532.jpg/

    https://imageshack.us/photo/my-images/13/66764143.jpg/

    Which browser do you use?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    That was actually my second entry. And they ALL work for me on my browser. Every last link I click internally works fine (except when it gives a 503, which is server security and something I know that I did).

    Hotlinking, by the way, would include the header image which shows just fine.

    I use Chrome.

    But on that note, if I use anything else it fails.

    So it’s not you, nor me, it’s Google (and according to their docs, has been a problem since 2009).

    Thread Starter Oosten Marc

    (@onzinpiet)

    That can be true, but before adding the hotlink protection codes to the .htaccess file the translator worked without problems…

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Incorrect assumption ??

    If it was hotlinking, it would fail in all browsers. It works in Chrome. Ergo Google’s being silly.

Viewing 15 replies - 16 through 30 (of 30 total)
  • The topic ‘Hotlink protection not working’ is closed to new replies.