I was wondering if there is a way to use the Alias directive with just one file. Or there was a hack to do this, without having to go into another directory.


Yes you can - the config for the Alias directive says:

Syntax: Alias URL-path file-path|directory-path

So you can have a directive such as:

Alias /robots.txt /path/to/robots.txt

|improve this answer|||||

You could use mod_rewrite. Here is a good tutorial explaining how it works and how to use it:


|improve this answer|||||
  • 4
    No need for mod_rewrite, where simple Alias will do. – Jacek Konieczny Mar 2 '10 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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