• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

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