How do I prevent php execution by directory name?

lbeachmike

Well-Known Member
Dec 27, 2001
306
1
316
Long Beach, NY
cPanel Access Level
Root Administrator
Hi there -

I'd like to prevent php execution for any file on all accounts of my servers by directory name.

For example - if the directory name is "cache" or "images" or "uploads" or "downloads" (or any/all subdirectories thereof) I want to disallow php from running in those directories. I realize this can be done at the directory level via .htaccess, but I want to setup global controls.

Is there a way to do this?

Thanks.

Mike