mod_rewrite: blocking referers: creating exceptions for RSS engines

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



paradoxlossAsked:
Who is Participating?
 
ahoffmannConnect With a Mentor Commented:
# 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
 
paradoxlossAuthor Commented:
sweet!  thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.