POV-Ray : Newsgroups : povray.off-topic : Question about an .htaccess file : Question about an .htaccess file Server Time
10 Oct 2024 23:18:23 EDT (-0400)
  Question about an .htaccess file  
From: Dan Byers
Date: 29 Jan 2008 12:40:00
Message: <web.479f6436e9f5c84da8d0b25a0@news.povray.org>
I have this little bit of code in the .htaccess file in my /img directory on my
website, the purpose of which is to keep people from hotlinking onto any GIF
files (btw we're talking about Apache):

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://mydomainname.com/.*$     [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mydomainname.com/.*$ [NC]
RewriteRule .*\.gif$        -                       [G]

I would like to add the capability to prevent JPG or PNG hotlinking as well.
Anyone know how to do that?  Do I copy everything from the first RewriteCond
thru the [G], and just supply the new file type instead of .gif?  Any help
would be appreciated.  Thanks :)

--
Dan
GoofyGraffix.com


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.