K so i have a php script, here it is minus the database info
<?PHP
session_start();
//require_once($_SERVER['D
OCUMENT_RO
OT'] . "/include/database.class.p
hp");
//require("/home//public_h
tml/includ
e/database
.class.php
");
$username_lookup = rtrim($_SERVER['REDIRECT_U
RL'],'/');
preg_match('/\/[A-Za-z0-9_
\- ]+$/', $_SERVER['REDIRECT_URL'], $matches);
$username_lookup = substr(trim($matches[0]),1
);
if($username_lookup){
//$db = new database();
//$db = new database();
//$db = new database();
$ho =
$us =
$pa =
$dbName =
// connect and select the database
$conn = mysql_connect($ho, $us, $pa) or die(mysql_error());
$db = mysql_select_db($dbName, $conn) or die(mysql_error());
//$db = new database
unset($_SESSION["user"]);
$a = 1;
$b = 5;
if($a<$b){
$_SESSION["user"]["usernam
e"] = strtolower($username_looku
p);
}
if($username_lookup == 'clearsession'){
unset($_SESSION["user"]);
}
}
if(!$_SESSION["user"]["use
rname"]){
header("Location: /real404.php");
}else{
//header("Location: /index.php");
include('index.php');
}
echo "<!--" . @$_SESSION["user"]["userna
me"] . "-->";
?>
Basically it uses a 404 error when someone types in a web address say
www.cool.com/4356 it searches the database to see if there is a 4356 and displays it as a replicated site if there is and returns a 404 error if it doesnt. Everything works great. People can put links into their site as well say
www.cool.com/4356 . Problem is people are getting there own domain names say
www.irock.com and forward it with domain masking to
www.cool.com/4356 . In firefox it works fine but in IE it is not setting the session variables. Has anyone heard of this bug before or any way around it?
Start Free Trial