до/напилить: 1) контроллеры в функциях, методах объектов, по названию и анонимные. 2) сделать так, что бы вместо `\/` работало `/` в регулярках. 3) если ни один роут не срабатывает, придумать какой-то 404. 4) обернуть всё в нормальную функцию типа router($routes)
Array ( [REDIRECT_UNIQUE_ID] => Z-F79yaFPK6FshktDPLZ5gAAAAk [REDIRECT_STATUS] => 200 [UNIQUE_ID] => Z-F79yaFPK6FshktDPLZ5gAAAAk [HTTP_X_REAL_IP] => 3.147.44.46 [HTTP_HOST] => route.asmer.php.a-level.com.ua [HTTP_X_FORWARDED_FOR] => 3.147.44.46 [HTTP_CONNECTION] => close [HTTP_ACCEPT] => */* [HTTP_USER_AGENT] => Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) [HTTP_ACCEPT_ENCODING] => gzip, br, zstd, deflate [PATH] => /bin:/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin [SERVER_SIGNATURE] => Apache Server at route.asmer.php.a-level.com.ua Port 80 [SERVER_SOFTWARE] => Apache [SERVER_NAME] => route.asmer.php.a-level.com.ua [SERVER_ADDR] => 127.0.0.1 [SERVER_PORT] => 80 [REMOTE_ADDR] => 127.0.0.1 [DOCUMENT_ROOT] => /home/asmer/public_html/route [REQUEST_SCHEME] => http [CONTEXT_PREFIX] => [CONTEXT_DOCUMENT_ROOT] => /home/asmer/public_html/route [SERVER_ADMIN] => [no address given] [SCRIPT_FILENAME] => /home/asmer/public_html/route/index.php [REMOTE_PORT] => 35478 [REDIRECT_URL] => /sitemap.xml [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.0 [REQUEST_METHOD] => GET [QUERY_STRING] => [REQUEST_URI] => /sitemap.xml [SCRIPT_NAME] => /index.php [PHP_SELF] => /index.php [REQUEST_TIME_FLOAT] => 1743879159.571 [REQUEST_TIME] => 1743879159 )