/ Published in: Apache
SESSIONNAME = Name of your session cookie;
example.com = Domainname of your site
example.com = Domainname of your site
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
RewriteEngine On ## PREVENT HOTLINKING ### SetEnvIfNoCase Cookie SESSIONNAME=(.*) IS_OK SetEnvIfNoCase Referer "^http://(www\.)?example\.com(/.*)?$" IS_OK #SetEnvIfNoCase Referer "^http://(www\.)?example\.net(/.*)?$" IS_OK <FilesMatch "\.(avi|bmp|flv|gif|jpe?g|mov|mp(3|4|e?g)|png|swf|tiff?|wm(a|v))$"> Order deny,allow deny from all allow from env=IS_OK ErrorDocument 403 http://127.0.0.1/ </FilesMatch>