How to Avoid Hotlinking in Apache
- 1). Open the start menu and type "notepad." Click "notepad" from the list of results.
- 2). Click "File," then "Open." Navigate to the "httpd.conf" file contained in the Apache directory. By default this located at "C:\Program Files\Apache Software Foundation" directory.
- 3). Type the following below the line that reads "<config>":
SetEnvIfNoCase Referer "^http://www\.domain\.ext/" banclick=1
SetEnvIfNoCase Referer "^http://domain\.ext/" banclick=1
SetEnvIfNoCase Referer "^$" banclick=1
Order Allow,Deny
Allow from env=banimages=1 - 4). Replace "domain" and "ext" with your domain and extension. For example, if your domain is "mydomain.com" replace "domain" with "mydomain" and "ext" with "com."
Source...