Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Hotlink protection in apache server  (Read 2487 times)

0 Members and 1 Guest are viewing this topic.

nirmal

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +0/-0
Hotlink protection in apache server
« on: November 17, 2013, 06:13:27 pm »
Hi Guys,

Hotlink protection in apache server
-----------------------------------------
This can be accomplished with a combination of SetEnvIf and the Deny and Allow directives. However, it is important to understand that any access restriction based on the REFERER header is intrinsically problematic due to the fact that browsers can send an incorrect REFERER, either because they want to circumvent your restriction or simply because they don’t send the right thing (or anything at all).

The following configuration will produce the desired effect if the browser passes correct REFERER headers.

SetEnvIf REFERER "www\.mydomain\.com" linked_from_here
SetEnvIf REFERER "^$" linked_from_here

   Order deny,allow
   Deny from all
   Allow from env=linked_from_here

Thank you
Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!