OK, this is driving me nuts. Say I want to block access for any request with the word 'reflect' in the URL.
It seems to me that this code should do it:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} reflect [NC,OR]
RewriteCond %{QUERY_STRING} reflect [NC]
RewriteRule .* - [F,L]
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
If I remove the Friendly URLs part, it works perfectly. My understanding is that using '[F,L]' will stop processing when that rule is matched, so the FURL part shouldn't execute.
Apparently I don't understand how .htaccess is processed and I've found no illumination on the web.
The site is in a subdomain, but I don't see how that's a factor, and if I change the rewrite base, I get a 500 error.