Hopefully someone out there can answer my question. Basically my website's URL is too long and I store my webpages in a number of different sub-directories. So that a page's URL doesn't take up the entire address bar, I would like it to display as something like (index.php3?page=home or http://www.domain.com/index.php3?page=home)
Please Help!
//index.php3 //$page is your parameter: //http://www.domain.com/index.php3?page=home
("home"=>"http://www.some-site.com/pages/home00/home.php", "contact"=>"/pages/contact.php");
$page_to_open = $pages[$page]; if(strlen($page_to_open)) header("location: ".$page_to_open); else header("location: ".$HTTP_REFERER);
SORRY
Lost some thing:
$pages = array("home"=>"http://www.some-site.com/pages/home00/home.php", "contact"=>"/pages/contact.php");
Or this:
switch($page) { case 'contact': header("location: pages/contact.php"); break; case 'home': header("location: pages/home.php"); break; default: header("location: index.php"); break; }