View Single Post
Old 06-05-2001, 01:41 AM  
TFCash
Confirmed User
 
Industry Role:
Join Date: Apr 2001
Posts: 1,738
If you do something like this in your main html directory it should protect everything below in all the sub directories.

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://name.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.name.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://255.255.255.255/.*$ [NC]
RewriteRule .*\.[Jj][Pp][Gg]$ - [F]

RewriteCond %{HTTP_REFERER} !^http://name.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.name.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://255.255.255.255/.*$ [NC]
RewriteRule .*\.[Gg][Ii][Ff]$ - [F]

You can also add other domains by just making another set of lines with all 3 of their options with "www", with out "www", and the IP # of the domain. If you tell me all the domains that you want to be able to link from, I'll make the exact .htaccess file for you and post it back here


Tim
TFCash is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote