Forum Moderators: phranque
# Check for requests for archives
RewriteCond %{REQUEST_URI} /archives/*
# Return 403 for all requests for archives
RewriteRule!^403\.shtml$ - [F] Also do I need the "L" (last) after the "F"? This would be going in before a list of 'deny by IP', but before a no-hotlinking section. Does that matter?
So, this raises several questions:
Do you want to block access to all files in all subdirectories called "/archives/", or just to one particular file called "archive.<something>"?
The rest of the syntax is OK, but look at the RewriteCond pattern and anchoring issues related to the above questions. There is a regular-expressions tutorial cited in our forum charter [webmasterworld.com], and another one in our library [webmasterworld.com].
There is a missing space in the RewriteRule, probably because posting on this forum removes them unless you take steps to prevent it (see page source). Your rule should look like this:
RewriteRule !^403\.shtml$ - [F]
Jim