logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: FilesMatch and files starting with "i"
Author
simopal6



Joined: 07 Mar 2007
Posts: 6

PostPosted: Thu 08 Mar '07 11:26    Post subject: FilesMatch and files starting with "i" Reply with quote

While looking for a solution to another problem (http://www.apachelounge.com/viewtopic.php?p=6749), i've run into something strange: i wanted to deny access to all files.
Code:
<FilesMatch "^a">
Order allow, deny
Deny from all
</FilesMatch>

This blocked access and visibility to all files whose names start with "a".
Code:
<FilesMatch "^[a-hj-z]">
Order allow, deny
Deny from all
</FilesMatch>

This blocked access and visibility to all files except those whose names start with "i".
Code:
<FilesMatch "^i">
Order allow, deny
Deny from all
</FilesMatch>

This blocked access and visibility to the server document root directory!! While testing, i've found out that this only happens with the letter 'i'. I removed the "DirectoryIndex index" directive, but the problem remained.
Why does this happen? What's so particuliar in files starting with 'i'?
Thank you!
Back to top
simopal6



Joined: 07 Mar 2007
Posts: 6

PostPosted: Mon 12 Mar '07 21:55    Post subject: Reply with quote

Anyone?

Admin note:
It is possible that no one knows an answer, makes no sense to post this.
Back to top
simopal6



Joined: 07 Mar 2007
Posts: 6

PostPosted: Wed 14 Mar '07 15:10    Post subject: Reply with quote

@admin: you're right, i'm sorry.

Could somebody please check on his/her own computer whether this happens also to you?
You should add these lines to httpd.conf. They make my entire server forbidden, instead of files only.

Code:
<FilesMatch "^i">
Order allow, deny
Deny from all
</FilesMatch>


Thank you.
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Wed 14 Mar '07 17:06    Post subject: Reply with quote

If you have mod_dir loaded and you don't provide a DirectoryIndex directive, it defaults to:
    DirectoryIndex index.html
per the docs for DirectoryIndex .

-tom-
Back to top
simopal6



Joined: 07 Mar 2007
Posts: 6

PostPosted: Thu 15 Mar '07 11:36    Post subject: Reply with quote

That's it!
Thank you!
Back to top


Reply to topic   Topic: FilesMatch and files starting with "i" View previous topic :: View next topic
Post new topic   Forum Index -> Apache