A long time ago, someone on these forums showed me a way to do this without listing every file extension that I wanted to exclude from being sent to index.php. I can’t for the life of me remember what they told me. Searching back through my old posts didn’t turn up the answer either. Any suggestions? Thanks!
I tried the following, but it will send a request for a non-existent file to index.php. For example, /styles/nonexistent.css will cause an error in index.php because there’s no such controller as “styles” in the MVC.
How would you do a 404 catch-all in Apache that prevents the bad request from getting sent to index.php in the first place? That’s basically the requirement.
Now that I think about it, it seems that the person who told me this line isn’t necessary didn’t consider this scenario. I mean, Apache couldn’t possibly know in advance whether or not the MVC can handle a given request.