URL Routing in PHP : url routes ony to 404-Not-Found page
问题 I have a php project in htdocs folder named "das-xampp". The index file in the root directory works as a router. I have another index.php inside views. so the structure is as below: das-xamp |__index.php |__views |__index.php |__about-us.php |__404-Not_Found.php So whenever someone types 'localhost/das-xampp' it should re-route the user to the index inside 'views/index.php' My root index(the one that works as a router) is as follows: <?php $path = trim($_SERVER['REQUEST_URI'], '/'); parse_url