Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

REFERER CONTROL WITH REWRITE in apache .

Status
Not open for further replies.

yakcora

Technical User
Dec 17, 2000
2
US
this code for httpd.conf file is from apache's site and it is to select few bad referers my problem is I want to allow specific referers what changes do i have to make in this code (I am a new apache user I dont even know how to read this code :) )
>>>>>>
RewriteMap deflector txt:/path/to/deflector.map

RewriteCond %{HTTP_REFERER} !=""
RewriteCond ${deflector:%{HTTP_REFERER}} ^-$
RewriteRule ^.* %{HTTP_REFERER} [R,L]

RewriteCond %{HTTP_REFERER} !=""
RewriteCond ${deflector:%{HTTP_REFERER}|NOT-FOUND} !=NOT-FOUND
RewriteRule ^.* ${deflector:%{HTTP_REFERER}} [R,L]


... in conjunction with a corresponding rewrite map:

-
-


>>>>>

If the referer is not in the deflector.map list (even if there is no referer) server shouldn't send any files and the referers should be domains subdomains and directories
...the map file:

it would be nice to show a page "you are not coming from a site that is alowed to link.( but not necessary)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top