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?


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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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