<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://wiki.webko.net.ua/index.php?action=history&amp;feed=atom&amp;title=Image_hotlink_protection</id>
	<title>Image hotlink protection - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.webko.net.ua/index.php?action=history&amp;feed=atom&amp;title=Image_hotlink_protection"/>
	<link rel="alternate" type="text/html" href="https://wiki.webko.net.ua/index.php?title=Image_hotlink_protection&amp;action=history"/>
	<updated>2026-05-11T11:51:32Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.webko.net.ua/index.php?title=Image_hotlink_protection&amp;diff=334&amp;oldid=prev</id>
		<title>Sol: Новая страница: «Категория:Nginx I had the following Nginx image hotlink protection code within the server blocks in my virtual host file:  #Prevent hotlinking  locat…»</title>
		<link rel="alternate" type="text/html" href="https://wiki.webko.net.ua/index.php?title=Image_hotlink_protection&amp;diff=334&amp;oldid=prev"/>
		<updated>2015-11-15T21:46:09Z</updated>

		<summary type="html">&lt;p&gt;Новая страница: «&lt;a href=&quot;/index.php?title=%D0%9A%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D1%8F:Nginx&quot; title=&quot;Категория:Nginx&quot;&gt;Категория:Nginx&lt;/a&gt; I had the following Nginx image hotlink protection code within the server blocks in my virtual host file:  #Prevent hotlinking  locat…»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Категория:Nginx]]&lt;br /&gt;
I had the following Nginx image hotlink protection code within the server blocks in my virtual host file:&lt;br /&gt;
 #Prevent hotlinking&lt;br /&gt;
 location ~ .(gif|png|jpe?g)$ {&lt;br /&gt;
      valid_referers none blocked .domain.com;&lt;br /&gt;
      if ($invalid_referer) {&lt;br /&gt;
         return   403;&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Alternatively, instead of sending a 403, you can replace the actual image with a custom image on the fly, using this code:&lt;br /&gt;
 #Prevent hotlinking&lt;br /&gt;
 location ~ .(gif|png|jpe?g)$ {&lt;br /&gt;
      valid_referers none blocked .domain.com;&lt;br /&gt;
      if ($invalid_referer) {&lt;br /&gt;
         rewrite (.*)\.(jpg|jpeg|png|gif)$ http://www.domain.com/images/hotlink-warning.jpg;&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Using the above code in your site’s virtual host file will replace the hotlinked image with your custom image (example shown below). Again do not forget to replace the domain name and the path to the custom image.&lt;/div&gt;</summary>
		<author><name>Sol</name></author>
	</entry>
</feed>