• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Hotlink protection

Status
Not open for further replies.

mnewbegin

Chevereto Member
I see on the script it has a full size image link (which I'm disabling from showing that on the page)

But I want to add hotlink protection with an image saying please visit the main page, please do not hotlink fullsize images.


Because I want the users to visit my page so the advertising banners and offers that are on the pages show up.


has someone scripted there own hot linking protection? or should I just script it?


thanks.

Mark.
 
I tried it out, but it seems to not work correctly. I think its because of the existing data in my .htaccess there..

what is the structure of the way the generated code should fit in?

it generated this for me...

Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mysite.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?myothersiteiwantallowed.com [NC]

RewriteRule \.(jpg|jpeg|png|gif)$ http://www.mysite.com/content/themes/mysitetheme/theme-img/hotlink.gif [NC,R,L]
 
try to check it with another browser... The browser save the image on cache.
 
mnewbegin said:
I tried it out, but it seems to not work correctly. I think its because of the existing data in my .htaccess there..

what is the structure of the way the generated code should fit in?

it generated this for me...

Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mysite.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?myothersiteiwantallowed.com [NC]

RewriteRule \.(jpg|jpeg|png|gif)$ http://www.mysite.com/content/themes/mysitetheme/theme-img/hotlink.gif [NC,R,L]

Wouldn't this just block all hot linking, is there a way to only block the big image and allow the thumbnails?

Maybe we can make the thumbnails PNG and only allow hotlinking to PNG files?

hmmm :)
 
Remember to use [NC, OR] on all the RewriteCond except on the last one when you have to put just [NC]
 
Status
Not open for further replies.
Back
Top