mod_rewrite: blocking referers: creating exceptions for RSS engines

Posted on 2005-05-14
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:

Question by:paradoxloss
    LVL 51

    Accepted Solution

    # use as first condition
    RewriteCond %{REQUEST_URI} !^/feed

    you also might check "Referer-based Deflector" at

    Author Comment

    sweet!  thanks

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
    If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    732 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now