Evo kod koji radi:
<?
// PHP?dir is a simple PHP-script to make simple URL's
// Created by Misty
//
http://members.lycos.nl/phpmisty/phpdir/
//
http://php.mistysweblog.tk
/* You can add url's in the form "namepage" => "
http://url.com/page.html"
with a comma between the different naam => url's (see example)
This will give the page url.com/thispage.php?page=namepage
It also works when you use other variables in the url as url.com/thispage.php?page=index&test=525 .
Then it adds the extra variable (test=525) also to the base url (
http://url.com/test/page/
becomes
http://url.com/test/page/?test=525) */
$url = array(
"index" => "
http://yourdomain.org/mainpage.php",
"news" => "
http://yourdomain.org/news.php?p=4",
"test" => "
http://yourdomain.org/test/",
);
//Other options
$title="My Page"; //Enter the page title
$keywords="personal, webpage, html, CV"; //Enter the page keywords
$description="My personal webpage: come and see it!"; //Enter the site description
// Do not edit below
if (array_key_exists($page,$url)){}
else {$page="index";}
if ($page=="")
{$page="index";}
$templink="page=$page&";
$tempurl1=str_replace ($templink, "", "$QUERY_STRING");
$templink="&page=$page";
$tempurl2=str_replace ($templink, "", "$tempurl1");
if ($tempurl2=="page=$page")
{$tempurl2="";
$vraag="";}
else
{if ($tempurl2=="") {$vraag="";}
else{
$vraag="?";}
}
$newurl="$url[$page]$vraag$tempurl2";
?>
<HTML><HEAD>
<meta name="keywords" content="<? echo("$keywords"); ?>">
<meta name="description" content="<? echo("$description"); ?>">
<TITLE><? echo("$title"); ?></TITLE>
</HEAD>
<FRAMESET rows="100%,*" border="0" frameborder="0" framespacing="0" framecolor="#000000">
<FRAME src="<? echo("$newurl"); ?>" name="page" frameborder="0" framespacing="0" border="0">
<NOFRAMES>
<body bgcolor="#FFFFFF" >
<CENTER>
<BR>
<BR>
<A href="<? echo("$newurl"); ?>"><? echo("$title"); ?></A>
</CENTER>
</BODY>
</NOFRAMES>
</FRAMESET>