added conditional routing for page.php