i have created a .htaccess file in my public web folder wish avoid other sites from hotlinking images from any of the folders on my server . RewriteEngine on
# redirect images
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER}!^http://(www\.)?example\.com/ [NC]
RewriteRule \.(gif?jpe?g?)$ /no.$1 [NC,L]
This works well.
Now my question is i want to allow hotlinking from one folder with few banners now what new .htaccess do i have to make so that hotlinking is allowed from this folder only and all others are protected.
this is my server
var/home/web/htdocs/ .htaccess with anti hotlink code
var/home/web/htdocs/images/ this is auto protected by above htaccess file
var/home/web/htdocs/faq/icons/ this one is protected to ..
now i made a folder at:
var/home/web/htdocs/faq/icons/protect/
now what sort .htaccess file do i have to put inside the folder /protect/ to allow hotlinking from this folder only so i can put some banners inhere ....
pls advise
[edited by: DaveAtIFG at 4:52 pm (utc) on Jan. 14, 2004]
[edit reason] Revised URL pattern to "example" [/edit]