Forum Moderators: phranque
Welcome to WebmasterWorld!
That code won't work because the directive should be <FilesMatch [httpd.apache.org]> not <Filematch>.
Also, your code allows the filetypes you specified, but is not flexible enough to handle some needed exceptions.
The easiest way to do this might be to use SetEnvIf [httpd.apache.org] and Deny,Allow [httpd.apache.org]:
<Files *>
SetEnvIf Request_URI "\.(html¦php¦gif¦jpg)$" allowed_file
SetEnvIf Request_URI "^(/¦/robots\.txt)$" allowed_file
Order Deny,Allow
Deny from all
Allow from allowed_file
</Files>
Change the broken pipe "¦" characters above to solid pipe characters before use. Posting on this forum modifies them.
Jim
<FilesMatch "\.(html¦php¦gif¦jpg)$">
Order deny,allow
allow from all
</FilesMatch>
is it done this way? it doesn't seem to work.
2.how to configure virtual host to disallow serving of directory content?
3. Virtual host logs.
how can i record its access logs to a seperate file?
with ip address and in common log format?
please advice. thanks
2.how to configure virtual host to disallow serving of directory content?
3. Virtual host logs.
how can i record its access logs to a seperate file?
with ip address and in common log format?
please advice. thanks