Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.