13

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.

Kyle
  • 552
  • 2
  • 5
  • 16

2 Answers2

25

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

DaveG
  • 1,077
  • 6
  • 13
1

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

einstiien
  • 2,538
  • 18
  • 18