header($_server['server_protocol'].' 302 found'); header('location: http://'.$_server['http_host'].'/path/index.htm'); dmitry ban Для перенаправления browser на нужный адрес (редирект) нужно воспользоваться конструкцией вида: header("location: " . $url); location должен задаваться абсолютным адресом, согласно rfc 2616 (http://www.w3.org/protocols/rfc2616/rfc2616-sec14.html#sec14.30) : "14.30 location the location response-header field is used to redirect the recipient to a location other than the request-uri for completion of the request or identification of a new resource. for 201 (created) responses, the location is that of the new resource which was created by the request. for 3xx responses, the location should indicate the server's preferred uri for automatic redirection to the resource. the field value consists of a single absolute uri. location = "location" ":" absoluteuri an example is: location: http://www.w3.org/pub/www/people.html" alexey kolesnichenko Для перенаправления по относительному адресу: header("location: http://".$_server['http_host'] .dirname($_server['php_self']) ."/".$relative_url);
|