'); // Config routes $routes = array_column(Router::getRoutes(), '0'); // Remove /admin and /test pages foreach ($routes as $key => $route) { if (strpos($route, '/admin') !== false || strpos($route, '/test') !== false) { unset($routes[$key]); } } foreach ($routes as $route) { $url = $xml->addChild('url'); $loc = Config::c('APP_URL') . $route; $url->addChild('loc', $loc); } header('content-type: text/xml; charset=UTF-8'); print($xml->asXML()); } }