Page 1 of 1

.htaccess deny access to .html files

Posted: Sat Nov 25, 2006 9:26 pm
by saibot1
I'm trying to deny access to all .html files but if I place this code, all my site is unaccessable. How can I deny access to all .html files without any errors?

Code: Select all

<Files *.html>
    Deny From All
</Files>

Posted: Sat Nov 25, 2006 9:45 pm
by volka
Why do your scripts include their "own" files via http and not the local filesystem?

Posted: Sat Nov 25, 2006 9:46 pm
by feyd
PHP shouldn't be requesting them remotely. They are local files.

You could rename them to .php and be done with it from there too.