서버에 3 개의 웹 사이트 (example1.com, example2.com, example3.com)가 있습니다.헤더 위치의 이상한 문제
<?php
header('Location:http://example2.com/a.php');
?>
이 http://example1.com/a.php로 이동 test.php 내가 검색 : 그 안에 아래에 단지 코드 example1.com의 페이지 (test.php)이 있습니다. 그것은 다른 도메인 URL이라는 것을 이해하지 못하고, 스스로 페이지를 찾으려고했습니다.
하지만 example2.com/a.php 대신 http://google.com을 입력하면 올바로 작동합니다. 나는 정말로 혼란스러워.
무엇이 문제입니까? 서버에서 일부 구성을 설정해야합니까?
(나는 호스팅 서버의 관리자입니다.) 시. 서버가 파운드 서버 뒤에 있습니다.
편집 :
여기 example1.com/test.php
문제가 해결Response Headers:
HTTP/1.1 302 Found
Date: Tue, 09 Oct 2012 09:03:34 GMT
Server: Apache/2.2.16 (Debian)
Location: http://example1.com/a.php
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 21
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=utf-8
Request Headers:
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding gzip, deflate
Accept-Language en-us,en;q=0.5
Connection keep-alive
Cookie mycookie
Host example1.com
User-Agent Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20100101 Firefox/14.0.1
a.php에 갖고있는 것을 example2.com에 게시 할 수 있습니까? –
간단한 'echo'가 있습니다; 명령 안에. –
http://example2.com/a.php를 브라우저에 넣으면 제대로 작동합니까? – Pigueiras