I have a site on a set of Linux Servers where my site is PHP enabled and I
would like to prevent people from externally linking to content on my site
and replace it with a warning image.
I've researched the following to put in an .htaccess file on teh root of my
server, but none of the methods or changes or suggestions I've found on the
web work...
=============== =============== =============== ===============
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.mydomain.co m/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mydomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://anothermydomain/.*$ [NC]
RewriteRule .*\.jpeg$ - [F]
RewriteRule .*\.jpg$ - [F]
RewriteRule .*\.zip$ - [F]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule ^URL_of_my_warn ing_image.jpg$ - [F]
=============== =============== =============== ===============
that is all I have in teh .htaccess file that sits at the root of my server,
but no matter what, if I type in a URL leading to content on my site
architecture, the warning image does not display - the file that was
requested is given. I want to force people to have to be at my site to be
able to view the images or download the zip files.
Please help.
Thanks.
would like to prevent people from externally linking to content on my site
and replace it with a warning image.
I've researched the following to put in an .htaccess file on teh root of my
server, but none of the methods or changes or suggestions I've found on the
web work...
=============== =============== =============== ===============
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.mydomain.co m/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mydomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://anothermydomain/.*$ [NC]
RewriteRule .*\.jpeg$ - [F]
RewriteRule .*\.jpg$ - [F]
RewriteRule .*\.zip$ - [F]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule ^URL_of_my_warn ing_image.jpg$ - [F]
=============== =============== =============== ===============
that is all I have in teh .htaccess file that sits at the root of my server,
but no matter what, if I type in a URL leading to content on my site
architecture, the warning image does not display - the file that was
requested is given. I want to force people to have to be at my site to be
able to view the images or download the zip files.
Please help.
Thanks.
Comment