Hi, i'm trying to redirect several /foldernames to a different page, basically to a no_result.php Anyone know how to do that? <?php ??? header("Location: " ??? "); } ?> PHP: thanks
header('Location: http://www.mywebsite.com/no_result.php'); This should help http://us3.php.net/manual/en/function.header.php
Okay - do you just want to redirect empty results to a specific page? Or is it specific foldernames you want to redirect? If you want to redirect every non-existing page/folder to a specific page, look into using .htaccess. If you want to redirect specific pages / folders to a specific page, look into adding the folders to either a database or an array, and check against that, something alike: if (in_array || in_database) { header('location: http://www.mywebsite.com/no_result.php'); }