'home.php', '/about' => '/custom/pages/about.php', '/about_morval' => '/custom/pages/about_morval.php', '/product/{id}' => 'product.php', '/product/{id}/{option_id}' => 'product.php', '/products' => 'products.php', '/products/{category}' => 'products.php', '/products/{category}/{sort}' => 'products.php', '/products/{p}/{category}/{sort}' => 'products.php', '/myaccount' => 'myaccount.php', '/myaccount/{tab}' => 'myaccount.php', '/download/{id}' => 'download.php', '/cart' => 'cart.php', '/cart/{remove}' => 'cart.php', '/checkout' => 'checkout.php', '/placeorder' => 'placeorder.php', '/placeorder/{order_id}' => 'placeorder.php', '/search/{query}' => 'search.php', '/logout' => 'logout.php', '/termsandconditions'=> '/custom/pages/termsandconditions.php', '/termsandconditions/{download}'=> '/custom/pages/termsandconditions.php', '/faq'=> '/custom/pages/faq.php', '/privacy'=> '/custom/pages/privacy.php', '/privacy/{download}'=> '/custom/pages/privacy.php', '/instructions-for-use' => '/custom/pages/faq.php' ]); // Check if route exists if ($url) { include $url; } else { // Page is set to home (home.php) by default, so when the visitor visits that will be the page they see. $page = isset($_GET['page']) && file_exists($_GET['page'] . '.php') ? $_GET['page'] : 'home'; // Include the requested page include $page . '.php'; } //debuglog if (log_usage){ //GET REMOTE ADRESS $user_1 = $_SERVER['REMOTE_ADDR'] ?? ''; $user_2 = $_SERVER['HTTP_X_FORWARDED_FOR'] ?? ''; //GET PAGE DETAILS $page = $_SERVER['REQUEST_URI'] ?? ''; $date = date('Y-m-d H:i:s'); //CREATE LOG MESSAGE $message = $date.';'.$page.';'.$user_1.';'.$user_2; //UPDATE LOGFILE debuglog($message); } ?>