1
votes

    <?php info(); ?>

shows “mod_rewrite” under “enabled modules”.

Here is my /var/www/.htaccess:


    Options +FollowSymlinks
    Options +Index
    RewriteEngine on
    RewriteRule ^foo.html$ index.html
    RewriteLog “rw.log”## Heading ##

/var/apache2/httpd.conf:


    <Directory "/var/www"> 
                Options Indexes FollowSymlinks MultiViews Includes
                AllowOverride all
                Order allow,deny
                Allow from all
    </Directory>

/var/www :


    -rw-r--r--  1 root root  111 2011-10-31 21:09 .htaccess
    -rw-r--r--  1 root root  197 2011-10-31 21:01 index.html

Yet instead of redirecting me to the index page, http://localhost/foo.html just gives me a 404. The rewrite log hasn’t been created, and the apache error log doesn’t record anything besides a 404. What am I doing wrong? I’ve spent hours reading through various tutorials and the apache documentation, and I’m thoroughly bamboozled. Thanks!!

1

1 Answers

1
votes

I've just had a quick trial on my server, your lines in .htaccess were giving errors for me: +Index (Should be +Indexes) RewriteLog “rw.log”## Heading ## (Apache reported that it wasn't allowed here).

Try changing to +Indexes and removing RewriteLog for now, then see what the last errors were in the apache log.