Welcome to WebmasterWorld Guest from 54.227.68.206

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Have Apache not serve certain file extensions

Is there a way to have apache not handle...

     
7:50 pm on May 8, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 5, 2001
posts:2728
votes: 8


Is there a way to have apache not serve specific file types? For instance I do not want any *.bak files to be served but they have to stay in the web directory.
8:34 pm on May 8, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 3, 2003
posts:1633
votes: 0


Hi,

You can do this the same way Apache prevents local config and password files from being served. Add the following to your configuration file:

<Files ~ "^\.bak">
Order allow,deny
Deny from all
Satisfy All
</Files>

Hope this helps!