Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do i setup .htaccess for a specific directory to not allow specific types of file extension and NOT ALLOW any execution of a the files within that directory?

share|improve this question
add comment

1 Answer

You cant.

A .htaccess file could only control the behavior of the webserver. If you are speaking about CGI script, that get executed, than you should configure your CGI directories correct.

Apache does not execute any other file then CGI's.

To forbid the execution of files on system level, you have to remove the x flag. But be careful. If you remove the x flag from a directory, you wont be able to enter it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.