Hello everyone, forgive me my English.
I try to find a good tutorial\article about writing htacces file, but I
failed. I found a lot of websites talking about how to solve a given
problem, but nothing about what those commands mean. Do you know something?
Right now I want to exclude certain website from reading images from my
own websites (I already wrote about it), can someone tell me if this is
correct (in .htaccess file):
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} .*jpg$|.*gif$|.*png$ [NC]
RewriteCond %{HTTP_REFERER} badsite1\.com [NC]
RewriteCond %{HTTP_REFERER} badsite2\.com [NC]
RewriteRule (.*) /goaway.html
What I want is that the badsite1.com and badsite2.com can't get my
images, instead they will be redirected to the goaway.html file, which
would be empty, is that ok?
And what about badsite1.com/subpage, will this work too, or should I
rather use something like:
RewriteCond %{HTTP_REFERER} badsite1\..*com [NC]
that is, any website url beginning with badsite1, is that correct?
I'd be very gratefull for your help.
--
Konrad Papala
www.konradp.com