Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

.htaccess to prevent websites stealing our content

copies the html code

3:33 pm on Apr 21, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 25, 2003
votes: 0

Here is a problem I have been running into lately. Its a bit long and complex but I am hoping someone who is really good at .htaccess can help....

I run a news website and like to keep track of Referers. Sometimes a certain referer will show up 25 or 30 times in quick succession and I was always wondering how this could be. Now I know....

It seems there are a couple of websites out there who simply take the source code to an article on our site, make a few changes and basically capture the story into their own website. I am thinking the multiple referers of the same source we are getting is from each time they attempt to grab an image off of our server.

Attempting to get our images does not work for them since our .htaccess file already protects our images.

My question is, is there a way to redirect any web page that attempts to do this (and javascript will not work 'cause they are on to it), not just this particular website, to our main site? Since they are attempting to grab images we already know they are trying to steal content...

Here is the relevant .htaccess as it now stands:

SetEnvIfNoCase Referer "^http://www.mysite.com/¦^http://mysite.com/" local_ref=1

# set the one below if firewall or ad prevention software is a concern. Otherwise they will not be able to see your images
SetEnvIfNoCase Referer "^$" local_ref=1
<FilesMatch "\.(gif¦jpe?g¦GIF¦JPE?G)">
Order Allow,Deny
Allow from env=local_ref

Thank you in advance.

3:01 pm on Apr 22, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member heini is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Jan 31, 2001
votes: 0

Webographer, I've moved your post here to the Tech forum, as this is the main playground of our .htaccess gurus.
Hope someone will be around to give you some feedback!

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members