Linux – Using FilesMatch to target ALL files

apache-2.4Apache2linuxregex

I've tried unsuccessfully to use the Apache FilesMatch directive to process all files as PHP. Using this <FilesMatch "\.html$">, I'm able to process specific file extensions as PHP, but I'm unable to find a directive that encompasses all file types, with our without extensions.

How can I configure Apache to parse all files for PHP content?

Best Answer

If you really mean what you say, that is, match ALL files, that would be something like:

<FilesMatch ^>

Try, but in any case I think this looks like a very bad idea. Better to be more specific, and match all cases "where" necessary.

Related Topic