Вход на сайт
.php header - Location
742 просмотров
Перейти к просмотру всей ветки
в ответ Kastrator 31.10.08 07:21
при
<?php
$url=$_SERVER['HTTP_HOST'];
if ($url=='zahar.de') {header("Location: http://www.zahar.de/zahar/news/index.php");}
else{ header("Location: http://www.zahar.de/bigmir/news/index.php");}
?>
в обоих случаях перекидывал на http://www.zahar.de/bigmir/news/index.php
###
добавил в 3-й строчке www.zahar.de
<?php
$url=$_SERVER['HTTP_HOST'];
if ($url=='www.zahar.de') {header("Location: http://www.zahar.de/zahar/news/index.php");}
else{ header("Location: http://www.zahar.de/bigmir/news/index.php");}
?>
все тесты вроде работают
http://www.zahar.de
http://zahar.de
и
http://www.bigmir.de
http://bigmir.de
Теперь есть два работающих варианта!
Спасибо!!!
<?php
$url=$_SERVER['HTTP_HOST'];
if ($url=='zahar.de') {header("Location: http://www.zahar.de/zahar/news/index.php");}
else{ header("Location: http://www.zahar.de/bigmir/news/index.php");}
?>
в обоих случаях перекидывал на http://www.zahar.de/bigmir/news/index.php
###
добавил в 3-й строчке www.zahar.de
<?php
$url=$_SERVER['HTTP_HOST'];
if ($url=='www.zahar.de') {header("Location: http://www.zahar.de/zahar/news/index.php");}
else{ header("Location: http://www.zahar.de/bigmir/news/index.php");}
?>
все тесты вроде работают
http://www.zahar.de
http://zahar.de
и
http://www.bigmir.de
http://bigmir.de
Теперь есть два работающих варианта!
Спасибо!!!