J
J
jle349252015-12-28 09:30:13
PHP
jle34925, 2015-12-28 09:30:13

What is the protection for pictures on anysex.com?

I ran into a problem if I create an HTML page on my apache server and place a picture from the site on it

<!DOCTYPE HTML>
<html>
<head>
  <title>Untitled</title>
</head>
<body>
<img src="http://screenshots.anysex.com/videos_screenshots/25000/25140/170x128/1.jpg" alt="" />
</body>
</html>

then it is no longer displayed at test.ru/index.html,
but if I just go to the folder and double-click to open the index.html file, then everything is displayed normally in the browser. the remote server probably detects my server and doesn't want to show the image, any advice?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Optimus, 2015-12-28
Pyan @marrk2

From here: blogerator.ru/page/fajl-primery-htaccess-redirekt-...
Are you tired of people who place pictures published on your site on their resources, thereby wasting your traffic and creating an unnecessary load on your hosting? This code, placed at the end of your .htaccess file, will prevent third-party sites from loading your images.

Options +FollowSymlinks
#Запрещаем загрузку файлов с внешних сайтов
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?site.com/ [nc]
RewriteRule .*.(gif|jpg|png)$ http://site.com/stop.gif[nc]

Don't forget to change site.com to your domain name and create a stop.gif image that will be shown instead of the requested image.
Solution: upload pictures to your server :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question