View Single Post
Old 08-08-2002, 11:52 PM  
X37375787
Guest
 
Posts: n/a
Would this htaccess work ?

I am trying to block both pic hotlinking and do cookie-based movie linking protection. Would this work or mess up, or do I even need the additional pic protection when using cookies ?

Quote:
ErrorDocument 400 http://www.domain.com/404.html
ErrorDocument 401 http://www.domain.com/404.html
ErrorDocument 403 http://www.domain.com/404.html
ErrorDocument 404 http://www.domain.com/404.html
ErrorDocument 410 http://www.domain.com/404.html
ErrorDocument 500 http://www.domain.com/404.html

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://domain.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.domain.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://domain.com:80.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.domain.com:80.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://xxx.xxx.xxx.xxx.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://xxx.xxx.xxx.xxx.*$ [NC]
RewriteRule .*[Jj][Pp][Gg]$|.*[Gg][Ii][Ff]$ http://www.domain.com
RewriteCond %{HTTP_COOKIE} !^.*access=granted.*$
RewriteRule .*$ http://www.yourdomain.com/404.html
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote