I did not find a better title if you have a better one please correct me.
My web application root looks like this:
- Controllers
-- User
--- Settings
--- Profile
-- Page
--- Edit
--- Show
- objects (models)
-- User
-- Page
- templates (views)
-- User
--- Settings
ect...
Now My Question is should i create a index file that handles everything?
Real URL -> mod_rewrite URL
index.php?module=user&action=settings -> /user/settings/
Or let mod_rewrite handle everything?
Controllers/User/Settings.php -> /user/settings/
I mean with a index file it’s much comfortable, but which one is faster? also which one is faster under high traffic?
Regards
The performance differential will be microscopic for any but the highest traffic apps, and doing your routing in PHP instead of mod_rewrite will be easier to maintain and more flexible.