[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

mod_rewrite: blocking referers: creating exceptions for RSS engines

Posted on 2005-05-14
2
Medium Priority
?
212 Views
Last Modified: 2010-03-04
Operating system       Linux
Kernel version      2.4.21-27.0.2.EL
Apache version      1.3.33 (Unix)



I swiped this code

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*casino(-|.).*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*credit(-|.).*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*deprivation(-|.).*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*disorder(-|.).*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*fries(-|.).*$ [NC]
RewriteRule .* - [F,L]

To help cut back on referer spam on my blog.  (The list is much much larger).   What specifically would I need to add to exempt certain engines that contain blacklisted words to fetch my RSS feed?

Assume my RSS path is:  /feed
And I want to allow:  IeatRSSandFries.net



0
Comment
Question by:paradoxloss
2 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 2000 total points
ID: 14021287
# use as first condition
RewriteCond %{REQUEST_URI} !^/feed

you also might check "Referer-based Deflector" at http://httpd.apache.org/docs/misc/rewriteguide.html
0
 

Author Comment

by:paradoxloss
ID: 14091894
sweet!  thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Integration Management Part 2
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month20 days, 10 hours left to enroll

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question