pues, ami mí me funciona perfectamente:
redirec.php (pagina en http
s):
Código PHP:
<?php
if(isset($_POST['user'])){
@session_name('Ses_id');
@session_start();
$_SESSION["user"]=$_POST["user"];
$_SESSION["password"]=$_POST["password"];
function normalpath(){
return "http://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
}
$page=normalpath();
$lastpath=strrpos($page,"/");
$newpage=substr($page,0,$lastpath+1)."destino.php";
//echo $newpage;
header("location: ".$newpage);
}
destino.php (en http):
Código PHP:
<?php
@session_name('Ses_id');
@session_start();
echo "Completado- usuario:",$_SESSION["user"]," pass:",$_SESSION["password"];