3 ms·
Don't you need an index, or something approximating an index? Having an index lets you redirect requests which aren't to public resources (images, js, css) thro
by krapp 13y ago
Don't you need an index, or something approximating an index? Having an index lets you redirect requests which aren't to public resources (images, js, css) through that single point and by extension the url router. That's what it's for.
I actually don't mind an index.php with some gnarly procedural code. Sometimes code has to do what it has to do, and it doesn't always have to be pretty.
- teraflop 13y agoThe article isn't saying you shouldn't have an index.php, it's saying that it shouldn't be part of the framework.
- krapp 13y agoAlright, I clearly didn't read the article well enough.
- erichurkman 13y agoAccess to static, public resources (images, js, css) should not be run through any dynamic language. Let the web server do what they do well: serve files. Or better yet, push that junk to a CDN.
- krapp 13y agoYeah, I wasn't clear, sorry, lack of sleep. It's usually .htaccess that either serves the static file or routes requests which don't hit a resource into index.php... but to me, that process, including .htaccess and an index file, would have to be an integral part of the framework.