homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

.htaccess to prevent websites stealing our content
copies the html code

10+ Year Member

Msg#: 169 posted 3:33 pm on Apr 21, 2003 (gmt 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.



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

Msg#: 169 posted 3:01 pm on Apr 22, 2003 (gmt 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!

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved