Forum Moderators: phranque
Any help would be greatly appreciated, thanks.
____________________________________
RewriteEngine On
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER}!^http://(www\.)?domain\.com/ [NC]
RewriteCond %{HTTP_REFERER}!^http://216\.239\.(3[2-9]¦[45][0-9]¦6[0-3]).*(www\.)?domain\.com [NC]
RewriteCond %{HTTP_REFERER}!^http://babel.altavista.com/.*(www\.)?domain\.com [NC]
RewriteCond %{HTTP_REFERER}!^http://216\.243\.113\.1/cgi/
RewriteCond %{HTTP_REFERER}!^http://search.*\.cometsystems\.com/search.*(www\.)?domain\.com [NC]
RewriteCond %{HTTP_REFERER}!^http://.*searchhippo\.com.*(www\.)?domain\.com [NC]
RewriteCond %{REQUEST_URI}!link\.jpg$ [NC]
RewriteRule \.(gif¦jpe?g)$ [domain.com...] [NC,R,L]
RewriteRule ^Car-News-([1-9][0-9]*).* modules.php?op=modload&name=News&file=article&sid=$1
RewriteRule ^Car-Review-([1-9][0-9]*).* modules.php?op=modload&name=Reviews&file=index&req=showcontent&id=$1
RewriteRule ^Car-Links-([1-9][0-9]*).* modules.php?op=modload&name=Web_Links&file=index&req=viewlink&cid=$1
RewriteRule ^Visit-Site-([1-9][0-9]*).* modules.php?op=modload&name=Web_Links&file=index&req=visit&lid=$1
RewriteRule ^Car-News-Archive.html modules.php?op=modload&name=Search&file=index&action=search&overview=1&active_stories=1
[edited by: Mad_Max at 10:04 pm (utc) on Mar. 6, 2003]
The second RewriteCond line must match your domain name, with and without "www.", i.e.
RewriteCond %{HTTP_REFERER} !^http://(www\.)?fuzzy-blue-widgets\.com/ [NC] The target address in the RewriteRule need not and should not contain "http://" and [R], unless you are redirecting to a different server. If you don't use [R], then you don't need the last RewriteCond - the one for REQUEST_URI.
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://216\.239\.(3[2-9]¦[45][0-9]¦6[0-3]).*(www\.)?carbc\.com [NC]
RewriteCond %{HTTP_REFERER} !^http://babel.altavista.com/.*(www\.)?carbc\.com [NC]
RewriteCond %{HTTP_REFERER} !^http://216\.243\.113\.1/cgi/
RewriteCond %{HTTP_REFERER} !^http://search.*\.cometsystems\.com/search.*(www\.)?carbc\.com [NC]
RewriteCond %{HTTP_REFERER} !^http://.*searchhippo\.com.*(www\.)?carbc\.com [NC]
# RewriteCond %{REQUEST_URI} !link\.jpg$ [NC]
RewriteRule \.(gif¦jpe?g)$ /link.jpg [NC,L]
And to reiterate the standard warning, "¦" characters must be edited to appear as a solid vertical line, and "!" characters used in patterns must have a preceding space.
HTH,
Jim
I didn't get a chance to test it too much though, apparently somebody has taken time out of their busy day to bring my hosting server to it's knees :(