1

I have a directory but only want one file type to be listed.

I've tried the following:

<FilesMatch "\.(?!ext).*$">
  Order Allow,Deny
  Deny from all
</FilesMatch>

However it gives me a 403.

Is there any way to do this?

1 Answer 1

2

Check out the IndexIgnore directive

The IndexIgnore directive adds to the list of files to hide when listing a directory. File is a shell-style wildcard expression or full filename. Multiple IndexIgnore directives add to the list, rather than the replacing the list of ignored files. By default, the list contains . (the current directory).

IndexIgnore README .htaccess *.bak *~
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.