<?
$domain = \"dit-domæne.dk\";
$default_page = \"index2.php\";
# Do you want to use frames?
$use_frames = \"yes\";
$underdomaene = $HTTP_HOST;
$underdomaene = eregi_replace(\"\\.\".$domain, \"\", $underdomaene);
$underdomaene = eregi_replace(\"www\\.\", \"\", $underdomaene);
$underdomaene = strtolower($underdomaene);
# If the sub domain is the name of a directory in the document root...
if (is_dir(\"$underdomaene\")) {
# The frames version:
if ($use_frames == \"yes\") {
echo \"<html><head><title>$domain/$underdomaene</title>\\n\\n\";
echo \"<!---------------------------------------------------------------------\\n\";
echo \" The sub domains at $domain were created using\\n\";
echo \" the PHP script \\\"Subdomains\\\"\\n\";
echo \"---------------------------------------------------------------------->\\n\\n\";
echo \"</head>\\n\\n\\n\\n\";
echo \"<frameset cols=100%,* frameborder=no border=0 framespacing=0>\\n\";
echo \"<frame src=http://$domain/$underdomaene>\\n\";
echo \"<noframes>\\n\";
echo \"<body bgcolor=black link=silver alink=black vlink=gray>\\n\";
echo \"<font face=helvetica color=white><center>\\n\";
echo \"This page uses frames, but it seems that your browser does not support this feature.\\n\";
echo \"To move on, click here:<br><a href=http://$domain/$underdomaene>$domain/$underdomaene</a>\\n\";
echo \"</center></font>\\n\";
echo \"</body>\\n\";
echo \"</noframes>\\n\";
echo \"</frameset></html>\\n\";
}
# The non-frames version:
else {
header(\"Location:
http://$domain/$underdomaene\");
}
}
# If the sub domain is NOT the name of a directory in the document root...
else {
if (!$REQUEST_URI || $REQUEST_URI == \"/\") {
include(\"index2.php\");
}
else {
header(\"Location:
http://$domain$REQUEST_URI\");
}
}
?>
kald denne kode for default.php
og kald så din forside for index2.php
/ webson