up vote 0 down vote favorite
share [g+] share [fb]

I have my apache server set up to read from settings. Everything works except mod_rewrite

eg.

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

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

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

</VirtualHost>

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

link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

Shouldn't your Directory directive look more like this:

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

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.