What are the advantages of implementing a separate routing class in PHP, especially when considering scenarios where Mod_Rewrite is disabled?

When Mod_Rewrite is disabled, using a separate routing class in PHP allows for creating clean and customizable URLs without relying on server configuration. This approach also provides better control over routing logic and allows for easier maintenance and scalability of the application.

class Router {
    public function route($url) {
        // Custom routing logic based on the URL
        switch($url) {
            case '/':
                // Handle home page
                break;
            case '/about':
                // Handle about page
                break;
            default:
                // Handle 404 page
                break;
        }
    }
}

// Example usage
$router = new Router();
$router->route($_SERVER['REQUEST_URI']);