I would like to prevent direct url access to some selected directories. But then make a few files inside the chosen directories accessible for direct url access. I’m having some trouble writing the < filesmatch > portion to allow access to the .php files inside the “xml/” directory. I’m wanting to include part of the “path” in the filesmatch directive, rather than create separate < directorymatch > directives for each directory i want certain files availabe in, but it doesn’t work…works if I remove the “/xml/” and put
In my httpd.conf I have a virtual directory set up. Inside the virtual directory I added the following:
Anyone know how I should write this?
Thanks for the help.
FilesMatch works purely on filenames – it doesn’t look at the path portion at all, so you’ll never get an ‘/xml/’ in a filename in the FilesMatch block. That’s why there’s DirectoryMatch above. Match the directory there, then match filenames within the dirmatch.