Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am setting up an apache2, and I am wondering how I would do this :

I want to redirect to a certain folder on my server, let's say /home/sites/mydestinationdirectory .

However I do not want to make the actual folder "destination" in /var/Www.

Is this possible in Apache2 and how would I do this ?

share|improve this question
up vote 1 down vote accepted

Use Apache's Alias directive.

Alias /destination /home/sites/mydestinationdirectory

<Directory /home/sites/mydestinationdirectory>
  Order allow,deny
  Allow from all

Another way would be to use mod_rewrite for more complex setups.

share|improve this answer
The Alias and alias target should always both have a slash or both not have a slash at the end. Do not mix those! – adaptr Nov 1 '11 at 14:22
And use AliasMatch or Redirectmatch for more complex cases. Most people who use mod_rewrite should really not be using mod_rewrite. – adaptr Nov 1 '11 at 14:23

Your Answer


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.