Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

We have a site, running on, we would like to have a folder/alias of redirect to the root of a site at How would you do this with apache directives? Examples would be awesome. Or guides.

Thank you very much in advance.

share|improve this question

In the apache config in the VirtualHost section of add:

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/time/
RewriteRule ^/$ [R,L]

If you want to hide the URL you should use mod_proxy in the redirections (this conf is not tested):

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/time/
RewriteRule ^/$ [P,L]


share|improve this answer

<META HTTP-EQUIV="Refresh" Content="0;> (haha)

This is LAZY people HTML, for the record.

share|improve this answer
Where would I put this? Under the apache virtual server directives? Or make an .html file of index.php or something and place it under /time/ ? If so, is there a cleaner way to handle it via directives? – Physikal Mar 30 '10 at 23:32
This? In an index.htm file actually! Yes there is a cleaner way. Put a .htaccess file in your domain root (right above your time directory) and place Redirect /time – Kyle Mar 31 '10 at 0:30

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.