Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm wondering if there is an apache mod that can handle delivering files outside of the document root?

My specific example is that I would like to, in my vhost config if possible, rewrite ROBOTS.txt so that I can provide a generic "disallow all" for use with hosts used for testing deployment.

The only alternative I can see is that I have a ROBOTS.txt replacement occuring in my deployment vhost setup script. I know I could probably use mod_rewrite, however the browser would still be aware that I'm pointing it to a different ROBOTS.txt location wouldn't it? As the ROBOTS is a disallow all, I don't want to have the browser aware of the rewrite, and risk it indexing the sites.

Thanks for any advice :D

share|improve this question
up vote 1 down vote accepted

mod_rewrite will do a rewrite (not a redirect) if possible. But you want Alias.

share|improve this answer
This looks just the thing, thanks :) – DanH May 6 '11 at 4:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.