Redirect JSON index files in sub dirs to PHP controller
===

I'm trying to figure out a way to make it so that if I have a directory that contains a JSON file as its index (e.g. `index.json`) that I can have it so that when someone visits that directory the `index.json` is passed to a "controller" PHP file outside of that directory that decodes the JSON and generates a page based on it. Is this possible somehow via .htaccess and/or PHP without needing to have multiple copies of the "controller" PHP file?