I have some sites on a server. they all have a drectory named 'image-upload' where users of sites upload their images.
I want to:
Off PHP engine for this directory on all the sites
disable .htaccess on this directory on all the sites
Can I do it apache config file using regex?
You can set configuration options using a FilesMatch and DirectoryMatch directove which uses a globbing patter (not a regex). But you don't even need a glob: just using a Directory directive has the same effect.
The manual describes doing this via .htacess, in your httpd.conf....
(but adding a .htaccess file to disable the engine as well would be a good idea).
It would be a better idea to keep user uploads completely outside the document root and mediate all access via a proxy script.