<Directory />
Options -Indexes
</Directory>

<Files *>
order allow,deny
deny from all
</Files>

This should deny any files in the folder containing this .htaccess from being shown via browser, yet, after putting it in the directory and restarting Apache I was easily able to list all files and view all files in the folder.

What did I do wrong?

Thanx
Phil

    Ok I got it to work, but now I get 500 Internal Server Errors whenever I do this:

    Syntax:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    </IfModule>

    Producing a 500 Internal Server Error using Apache 1.3 within a .htaccess file

    I can't find a thing online to help me with this one, so can someone out there help me?

    Thanx
    Phil

      Have you tried looking through Apache's error log? This should give you some more insight. Copying your code to my server worked, though I'm using Apache (v2.0.59).

        Interesting..

        Turns out that it's not "mod_rewrite.c" but "mod_rewrite.so". So a slight adjustment and that works now

        And incidentally, I'm using Apache 1.3

        Thanx
        Phil

          D'oh, sounds like you're talking about a *nix server, not a Windows server... makes sense.

          Glad you figured it out!

            No I am talking about a Windows server installation of Apache 1.3, but there is no mod_rewrite.c but there is a mod_rewrite.so

            Hey, I got it from the site and it said it was a Windows installation

              Write a Reply...