homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Rewrite to stop linking.

 11:29 pm on Apr 24, 2001 (gmt 0)

I ran across this and thought I would get some opinions before trying it out:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !http://www.your_domain.com/
RewriteCond %{HTTP_REFERER} !http://your_domain.com/
RewriteRule /* [send_thieves_here.com...]

Will it really work? Are there other similar uses someone may be able to share?



 11:34 pm on Apr 24, 2001 (gmt 0)

Yeah it will work. There is a similar construct to stop image pulls. I'll see if I could dig it up.


 11:47 pm on Apr 24, 2001 (gmt 0)

Here are two ways:
SetEnvIfNoCase Referer "^http://my.apache.org/" local_ref=1
<FilesMatch ".(gif¦jpg)">
Order Allow,Deny
Allow from env=local_ref
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://your_domain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.your_domain.com/.*$ [NC]
RewriteRule .*\.(gif¦GIF¦jpg¦JPG)$ - [F]


 4:21 pm on Jun 26, 2001 (gmt 0)

And please do those running with referrers off, or browsers that don't support referrers a favor by atleast saying something coherent on the error page.

I run with referers off most of the time.


 8:55 pm on Jul 29, 2001 (gmt 0)

What happens with the linking to images from the Google cache?

I've got some graphics linked to from a couple of places at delphi.com and some personal homepage at members.domain.com/dir/membername

I just want to ban those whole domains from linking. What works for that?

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