We use shorturls for our site, but people will obviously sometimes enter the wrong word after a /. ie. not domain.com/help, but domain.com/hlp
And then it cannot find that page and throws an INCLUDE error.
So is there something in the include script that can be added, so that if it cannot find the file, it redirects?
Here is my include script:
Code: Select all
$page = $_GET['page'];
if ($page == "") { }
else
{
function getPage()
{
$thispage="includes/".$_GET['page'].".inc";
include $thispage;
}
}
$menu = $_GET['menu'];
if ($menu == "") {}
else
{
function getMenu()
{
$thismenu="includes/menu/".$_GET['menu'].".inc";
include $thismenu;
}
}