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 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.

share|improve this question
add comment

2 Answers

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

share|improve this answer
add comment

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

http://articles.sitepoint.com/article/guide-url-rewriting

share|improve this answer
2  
No need for mod_rewrite, where simple Alias will do. –  Jacek Konieczny Mar 2 '10 at 19:37
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.