View Single Post
Old 2005-01-14, 12:19 AM   #3
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
Code:
###HOTLINKING BEGIN
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://thissite.com [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thissite.com [NC]
RewriteCond %{HTTP_REFERER} !^http://othersite.com [NC]
RewriteCond %{HTTP_REFERER} !^http://www.othersite.com [NC]
!^http://1.2.345.678.9[NC]
RewriteRule .*\.([Jj][Pp][Gg]|[Gg][Ii][Ff])$ http://www.someplacetoredirect404.c...EMOVE/NO_NO.gif  [R,L]
###HOTLINKING END
First, you don't need the .*$ at the end, that requires an end of line match anchor which just wastes regexp processing. Even with your existing rules, your first rule would have also matched your third rule with the :80.*

Fewer rules = better, however, there are certain regexp rules that take more processing than chained rules.

anchored matches are always better
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote