I am debating routing my requests with one of the two options:
Option 1: simple capture route with Mod-Rewrite and funnel written $_GET
route to index.p
Usually in MVC frameworks, this sort of thing is usually best handled by a front controller (named index.php
or the like). You use mod_rewrite to then hide index.php
from all of the URLs so your users see nice clean paths.
It's also way easier to handle in PHP than in Apache's rewrite directives. PHP is much more flexible and easier to write/understand. I'm not sure I've ever seen mod_rewrite used as the sole routing engine for any web framework out there, now that I think of it.
Your second snip of code is the way to go for your rewrite directives.