Most of the code here is just for testing, but here is what i have:
Code
<!--[php]-->
$filename = $_SERVER['PHP_SELF'];
$newfilename = str_replace("/", "", $filename);
//print_r $filename;
if ($type == 'admin' || $module == 'advProfile' || $module == 'User' || $newfilename == 'user.php'){
$domain = $_SERVER['HTTP_HOST'];
$newdomain = str_replace("secure.", "", $domain);
if ( isset($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) == 'on' ) {
header ('Location: http://'.$newstring.$_SERVER['REQUEST_URI']);
exit();
}
}
echo $newfilename;
<!--[/php]-->
$filename = $_SERVER['PHP_SELF'];
$newfilename = str_replace("/", "", $filename);
//print_r $filename;
if ($type == 'admin' || $module == 'advProfile' || $module == 'User' || $newfilename == 'user.php'){
$domain = $_SERVER['HTTP_HOST'];
$newdomain = str_replace("secure.", "", $domain);
if ( isset($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) == 'on' ) {
header ('Location: http://'.$newstring.$_SERVER['REQUEST_URI']);
exit();
}
}
echo $newfilename;
<!--[/php]-->
