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 have my apache server set up to read from settings. Everything works except mod_rewrite


<VirtualHost *>
        ServerAlias www.
        DocumentRoot /home/sitehome

        <Directory />
        ServerSignature Off
        Options -Indexes
        DirectoryIndex index.php

        RewriteEngine On
        RewriteBase /
        RewriteRule ^index\.html$ index.php [NC,L]


Apache won't follow the rewrite rules, and say that "index.html" doesn't exist, but if I put a .htaccess file in the sitehome directory, it'll read that and apply the rewrite rules correctly.

Why would this happen?

System: Ubuntu 7.10 Gutsy with Apache2

share|improve this question
up vote 0 down vote accepted

Shouldn't your Directory directive look more like this:

<Directory /srv/www/htdocs/>
share|improve this answer
Wow, that worked. Thanks a bunch! – Richard Sep 23 '09 at 4:49

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.