0

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

DanH
  • 827
  • 2
  • 9
  • 26

1 Answers1

1

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

Ignacio Vazquez-Abrams
  • 45,939
  • 6
  • 79
  • 84