Thanks DWB. You and I are truly brothers from other muthas.
Quote:
|
Originally Posted by lokiproductions
Newbie type question.
Does this then also protect subdomains?
And for someone posting galleries to TPG's are there instances where hotlinking is required?
|
htaccess can protect an entire domain, or just a certain folder.
And as far as I know you should never have to hotlink anything when posting to a TGP. Your gallery should have all the images and thumbs right there in that folder. It gets too messy any other way. As for your recips they are linked from within your own domain, so that shouldn't be a problem.
However... if for whatever reason you would need to hotlink, or allow yourself to be hotlinked, just add that domain into the htaccess. Just add lines like this.
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://domain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.domain.com/.*$ [NC]RewriteCond %{HTTP_REFERER} !^http://IP/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.IP/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://domain1.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.domain1.com/.*$
RewriteCond %{HTTP_REFERER} !^http://domain2.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.domain2.com/.*$
RewriteCond %{HTTP_REFERER} !^http://domain3.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.domain3.com/.*$
RewriteCond %{HTTP_REFERER} !^http://domain4.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.domain4.com/.*$
RewriteRule \.(gif|jpg)$
http://www.domain.com/nasty.jpg [R,L]