Forum Moderators: phranque
WebMasterWorld: "Redirect certain referer in htaccess" [webmasterworld.com]
If I may ask: Why do you want to do this?
Eliz.
Welcome to WebmasterWorld!
You may find my comments regarding best practices for error pages in message #2 of this thread to be useful:
[webmasterworld.com...]
The simplest solution for your problem, as described, may be to use Apache mod_rewrite. One or more RewriteCond(s) examining HTTP_USER_AGENT, REMOTE_ADDR and/or REMOTE_HOST can then be used to internally rewrite (not redirect) requests for the custom 404 errordocument *pages* to different *files*, depending on the requestor.
I cannot recommend this approach, though, because it adds complexity to a critical error-reporting mechanism on your server. IMO, error handling should be kept simple so that you can always trust it to work when needed.
Jim