lucy24 - 10:43 pm on Mar 29, 2012 (gmt 0)
With the redirect method you don't use SetEnv at all. (I looked pretty hard, as I assume you did, but couldn't find an env= envelope. Just Files and Directory, and I forget the third.) You put an htaccess in the Directory For Icky Robots, with its own
statement. For example: my top-level htaccess has a series of
ErrorDocument 404 /boilerplate/missing.html
for the assorted common errors. Then, in the /dp/ directory I've got a one-line htaccess that says
ErrorDocument 404 /dp/missing.html
If someone's in this directory at all, they are probably following some ancient Forums link that I've forgotten all about, so they get customized information.
A directory-specific ErrorDocument statement overrides your generic rules in exactly the same way that you can switch auto-indexing off or on for individual directories. It will be inherited by subdirectories-- if there are any-- but will have no effect on other directories.