So I'm using the built-in PHP server for local development and testing:
php -S localhost:8080
One major eccentricity or "bug" of this built-in server is that it not only treats index.php as the default page but also "rewrites" any URL paths to that page. That means when I type `http://localhost:8080/foo/bar`, it shouldn't open anything as there is no `/foo/bar` directory structure. Instead, it causes the /foo/bar to be rewritten to my index.php so that the URL actually becomes `http://localhost:8080/index.php/foo/bar`.
On a production server, this won't happen unless you add an apache rule in the .htaccess file. So this creates obvious problems sometimes for reproducing a live issue as local testing goes smoothly whereas the app won't work on production. Is there a way to make the built-in server stop redirecting every request to index.php and behave just like apache or nginx server?
2) For the love of god, don’t use built-in server for production cases. It’s mentioned multiple times in the documentation for a reason.