Questions tagged [hotlinking]

Hotlinking is the use of a linked object, often an image, from one site by a web page belonging to a second site.

245 questions
2
votes
1 answer

.htaccess hotlink protection doesn't work

can you correct & inform me please. My issue is my .htaccess hotlink protection doesn't work. I am on a shared server with .htaccess suppport. (SEO friendly linking works)My domain type is http://www.mydomain.p.ht OR http://mydomain.p.ht my 2…
Andre Chenier
  • 1,166
  • 2
  • 18
  • 37
2
votes
2 answers

mod_rewrite not working properly for hotlinked images

i want to redirect all hotlinked images to one dummy image. i applied htaccess code for this purpose, but it is only redirecting 404(not found) images means the hotlinked images with correct links are not being redirected. i also have applied a…
Mudassar Bashir
  • 2,542
  • 2
  • 14
  • 11
2
votes
2 answers

hotlink protection

i made this simple code to prevent hotlinking my files from my php download file : if ((strpos($_SERVER['HTTP_REFERER'],'www.domain.com')!==0)) { $redirect='index.php'; header("Location: $redirect"); exit; } it's not working , it always…
Alamri
  • 2,112
  • 2
  • 16
  • 21
2
votes
1 answer

IMDB Poster URL Returns Referral Denied

In my Ruby on Rails app, I use the imdb gem (https://rubygems.org/gems/imdb) to search for a movie by title and grab the poster url and add it to the movie model I have in my database. Then in my view, I put that url in an image source tag and…
tanookiben
  • 22,575
  • 8
  • 27
  • 25
1
vote
1 answer

Image Hotlink Redirect

I want to redirect any web page that uses my images to my website home page. Is this possible? I know you can redirect to a custom image, but can I redirect the page using my image to my website front page? Thanks.
Adrian M.
  • 7,183
  • 15
  • 46
  • 54
1
vote
1 answer

Disable Hotlinking in General, but allow for subdomain

So I want to disable Hotlinking in general but allow it for the subdomain "thumbs". My .htaccess is as the following: #HOTLINKING RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://domain.com/.* [NC] RewriteCond %{HTTP_HOST}…
Jonas Kaufmann
  • 1,797
  • 3
  • 22
  • 43
1
vote
2 answers

Using htaccess for image protection

I am close to launching a photography website and want to give some protection to my images. I have the following as a result of searching on the web: #Set FollowSymLinks, in most cases already set on the server Options +FollowSymLinks #Enable…
martin
  • 393
  • 1
  • 6
  • 21
1
vote
1 answer

Dynamically resample hotlinked images using php

I have an images directory, some with massive resolutions, so I'd like to serve a much lower resolution version if they get hotlinked and I'm also overlaying a repeating image (like a watermark) informing the viewer that the image is stolen and…
Ben
  • 315
  • 4
  • 19
1
vote
1 answer

How to prevent hotlinking only for specific website using .htaccess

I want to be able to prevent hotlinking and show a specific image only for some domains. I have tried this method but this prevent all sites from hotlinking using .htaccess RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER}…
Astrit Shuli
  • 619
  • 4
  • 20
1
vote
1 answer

Hotlinking: How do I differentiate between an image in a tag versus an image link?

I want to allow partial hotlinking to images on my website. I want to allow a specific site (Reddit) to be able to show an image from my website on their page, but if they click on the link to the image from that site, it should go to an image…
lifeformed
  • 525
  • 4
  • 16
1
vote
1 answer

.htaccess, prevent hotlinking, allow big bots, allow some access and allow my own domain without adding it statically

I want to allow image crawling on my site from a couple of different bots and exclude all others. I want to allow images in at least one folder to not be blocked for any request. I don't want to block image requests from visitors on my own site. I…
Vince
  • 910
  • 2
  • 13
  • 29
1
vote
1 answer

Prevent opening image in browser directly

I have a folder with pictures 1.jpg, 2.jpg, 3.jpg... Is there any way to prevent user to type the URL like www.example.com/pictures/3.jpg directly into browser and loading that image? The image should be loaded if web html calls it (< img…
Jerry2
  • 2,955
  • 5
  • 30
  • 39
1
vote
1 answer

Disable hot linking or direct download of my videos and only stream the video when it's displayed from a page in my website

I want to disbale hot linking of FLV and MP4 videos hosted on my server, except when the videos are displayed from a page which its URL starts with : http://www.mywebsite.com/index.php?main_page=videos_page& What are the apache configurations that…
KarimMesallam
  • 290
  • 8
  • 19
1
vote
0 answers

Firebase web hosting - how to prevent hotlinking?

I am hosting my website on Firebase's web hosting. I have two slightly different scenarios I'm trying to figure out. Scenario 1 - I want to prevent someone from accessing anything in my /images or /js or /css folder unless the request is coming…
CindyHoskey
  • 67
  • 1
  • 3
1
vote
0 answers

mod_auth_token for tomcat

Is there a Tomcat Servlet that works similar to mod_auth_token? mod_auth_token is written in C, mean for Apache. I am looking for a pure Java implementation. It is better if that implementation extends the Tomcat DefaultServlet, which supports gzip,…
so_mv
  • 3,939
  • 5
  • 29
  • 40