Thanks for the quick reply.
I just tried commenting out these two lines:
//header(‘Content-Type: application/octet-stream’);
//header(‘Content-Disposition: attachment; filename=”newsletter-subscribers.csv”‘);
and that was the problem as far as the page being considered “Not Found”.
Now there’s just a ton of CSV being outputted. Unfortunately saving that page via browser as .csv doesn’t work…you need to view source and copy-paste to a text editor then save, which of course isn’t a great solution.
There must be something in Apache that doesn’t like/understand the content type or disposition?