How do MVC systems where the urls are in these forms force all the requests through a single index.php file?
http://www.example.com/foo/bar/baz
http://www.example.com/goo/car/caz/SEO-friendly-name-of-the-object
http://www.example.com/hey/you
EDIT: When I try the rewrite rules below I get this error:
[error] [client 127.0.0.1] Invalid URI in request GET / HTTP/1.1
[error] [client 127.0.0.1] Invalid URI in request GET /abc HTTP/1.1
EDIT: Oh, this is the complete content of /index.php. When I remove the rewrite rules, it outputs '/' or '/index.php' or I get a 404 for anything else.
<?php
echo htmlspecialchars($_SERVER['REQUEST_URI']);
?>
SOLVED: I added a / in front of index.php in the rewrite rule and then it worked:
SOLVED AGAIN: Turns out the / was only needed because I was running 2.2.4. When I upgraded to 2.2.11 the / was no longer needed.