Results 1 to 10 of 14
-
9th Jul 2011, 01:17 AM #1OPMember
No image hotlinking - can't get it to work
Hi, i want to block image hotlinking from my website.
I found instructions on how to do it and i edited the .htaccess file but it's not working. Here is what i added:
Code:RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mywebsite.com [NC] RewriteRule \.(jpg|jpeg|png|gif)$ http://external_image_to_show_instead [NC,R,L]
Code looks ok. However, I'm not sure why it doesn't work for you.
So, i'll need your help hereCyberbob Reviewed by Cyberbob on . No image hotlinking - can't get it to work Hi, i want to block image hotlinking from my website. I found instructions on how to do it and i edited the .htaccess file but it's not working. Here is what i added: RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mywebsite.com RewriteRule \.(jpg|jpeg|png|gif)$ http://external_image_to_show_instead I tried to open a support ticket to KnownSRV but all i got was: :facepalm: Rating: 5
-
9th Jul 2011, 01:26 AM #2Pure Awesomeness!
-
9th Jul 2011, 01:27 AM #3OPMember
Yes i did change the url of the website and the image i just didn't want to show it
-
9th Jul 2011, 01:40 AM #4Pure Awesomeness!
-
9th Jul 2011, 01:53 AM #5OPMember
Thanks Mr-R-T, i'll keep looking for another code
If someone knows another way, let us know
-
9th Jul 2011, 06:09 AM #6Respected MemberWebsite's:
DL4Everything.com Soft2050.inTry this, may work:
Code:RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC] RewriteCond %{HTTP_REFERER} !^$ RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://myimageurlheretoshownotavailable.com [L]
-
9th Jul 2011, 02:24 PM #7OPMember
@soft2050, it's also not working
-
9th Jul 2011, 03:01 PM #8Respected Member
You probably are using ngnix.
Try this:
valid_referers blocked www.mydomain.com mydomain.com;
if ($invalid_referer) {
rewrite ^/wp-content/uploads.*\.(gif|jpg|jpeg|png)$ http://www.mydomain.com/wp-content/banners/Banner3.jpg last
}
if(!-e){
rewrite ^(.*)$ /index.php last
}
location ~* (\.jpg|\.png|\.css)$ {
valid_referers blocked mydomain.com www.mydomain.com;
if ($invalid_referer) {
return 444;
}
}
-
9th Jul 2011, 03:54 PM #9OPMember
@Lock Down, i wanted this to work, but still nothing.
At .htaccess file there is also some code from wordpress:
# 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>
# END WordPress
-
9th Jul 2011, 04:50 PM #10Respected Member
Are you using ngnix?
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Looking For Image Host Allows Adult & Hotlinking
By DJboutit in forum File Host DiscussionReplies: 13Last Post: 26th Sep 2011, 02:07 PM -
reliable image host with hotlinking
By incognito in forum Webmaster DiscussionReplies: 4Last Post: 8th Sep 2010, 12:05 PM -
Best free image host (hotlinking allowed)
By shadeslader in forum General DiscussionReplies: 20Last Post: 19th Apr 2010, 11:44 PM -
stop image hijacking (anti-hotlinking) Lighttpd
By jessepure in forum Server ManagementReplies: 4Last Post: 16th Jan 2010, 12:19 PM -
Prevent Image Hotlinking
By Whoo in forum Webmaster ResourcesReplies: 6Last Post: 23rd Sep 2008, 05:14 PM
themaRegister - register to forums...
Version 3.56 released. Open older version (or...