.htaccess deny access to .html files

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
saibot1
Forum Newbie
Posts: 8
Joined: Sat Nov 25, 2006 9:13 pm

.htaccess deny access to .html files

Post 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>
Last edited by saibot1 on Wed Dec 06, 2006 6:48 am, edited 2 times in total.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Why do your scripts include their "own" files via http and not the local filesystem?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
Post Reply