The following works fine for allowing PHP to be executed on two XML files:
<FilesMatch ^(opensearch|sitemap)\.xml$>
AddHandler application/x-httpd-php5 .xml
</FilesMatch>
However unfortunately this rule would allow this to happen in any child directory as well.
- /opensearch.xml, working/desired match
- /henchman24/opensearch.xml, working/NOT desired match
How do we force Apache to only match the files in the current directory and not child directories?
I'd really like to:
- Avoid adding a child
.htaccess
file in every possible child directory. - Avoid using an absolute server path.