Forum Moderators: phranque

Message Too Old, No Replies

Have Apache not serve certain file extensions

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

         

EliteWeb

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

WebmasterWorld Senior Member 10+ Year Member



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.

dmorison

8:34 pm on May 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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!