I'm currently introduce myself to the world of WebDev and trying to create a very basic mvc framework (like most I guess lol) for learning purposes.
Now I want to redirect all requests to /bootstrap.php (which handles routing, invokes controller, init smarty etc) from within my /.htaccess file. My router class needs requests like the following examples (changeable if needed):
https://www.stuck1a.de/home?foo=bar // ~> /mvc/views/pages/home/index.tpl?foo=bar
https://www.stuck1a.de/home/index?x=y // ~> /mvc/views/pages/home/index.tpl?x=y
https://www.stuck1a.de/music/byartist // ~> /mvc/views/pages/music/byartist.tpl
...
My problem now is, that the path /home/* technically doesn't exist (SEO), so a request like the examples above lead to a 404 (of course) instead of make use of redirection rules from /.htaccess.
Well, I think creating a file /home/.htaccess which redirects requests to /bootstrap.php would solve this, but that can't be the whole point of the matter...
Because SEO-URL's are very common, I'm pretty sure, there must be an easy solution for my problem, that I just can't think of. I hope you understand what I mean. If you need more informations or want to see sources, just let me know.
Thanks and best regards,
Stuck1A