I have a MVC (Model, View, Controller) structured site that I'm thinking about. It's hosted on smallbusiness.yahoo.com. (Apache) They limit the hosting to php (and mysql), and there's no way I can edit the server configurations. That means no .htaccess files! I have searched for the solution for a long time, but they all involve editing the server configurations. I am looking for a way to rewrite URLs with only php itself.
I want to do URL rewriting so that the controller(s) can receive parameters through the URL. I know Codeigniter does this, but I do want to LEARN how it does it.
For example, something like this:
example.com/page.php?page=whatever
turns into
example.com/page/whatever OR
example.com/whatever
I've seen some examples with $_SERVER['PATH_INFO'], but I don't understand what that does. I've tried
$_SERVER['PATH_INFO'] = '/';
But that did nothing... Help would be greatly appreciated!!