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.

I want to disable the php engine in all directories below the current one.

I have tried using <Directory> and <DirectoryMatch> but cannot find the correct regex syntax for matching just sub directories.

Example directory structure:

files/folder1/ files/folder2/ files/folder3/folder3a

I want to match folder1/, folder2/, folder3/ and folder3a/ but not files/

Any ideas?

share|improve this question

1 Answer 1

what you're doing here is inverting hierarchy. Everything is designed to work the other way around. My advice would be to change your folder structure so that you don't need to do things backwards.

Perhaps have one folder for your scripts, and enable PHP in that only, and another folder containing everything else.

share|improve this answer

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.