Forum Moderators: phranque
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.example.com");
exit();
?> and while testing my response codes at wannabrowser.com i receive these headers:
HTTP/1.1 301 Moved Permanently
Date: Wed, 26 Apr 2006 04:36:02 GMT
Server: Apache/1.3.34 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.1 FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.7a
Location: http://www.example.com/images/
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1HTTP/1.1 301 Moved Permanently
Date: Wed, 26 Apr 2006 04:36:02 GMT
Server: Apache/1.3.34 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.1 FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.7a
X-Powered-By: PHP/4.4.1
Location: http://www.example.com
Transfer-Encoding: chunked
Content-Type: text/html
HTTP/1.1 200 OK
Date: Wed, 26 Apr 2006 04:36:02 GMT
Server: Apache/1.3.34 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.1 FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.7a
X-Powered-By: PHP/4.4.1
Set-Cookie: cookieid; path=/; domain=www.example.com
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Transfer-Encoding: chunked
Content-Type: text/html
is this normal?
[edited by: jdMorgan at 1:27 pm (utc) on April 26, 2006]
[edit reason] Example.com [/edit]
That's the best I can offer, since you didn't state what you are trying to accomplish with this redirect.
Jim
Did you perhaps requested the non-www domain when requesting the /images/ index file? If so, and if you have a non-www-to-www-domain redirect, then that would explian the two stacked redirects; The first to canoniclize the domain, and the second to redirect from /images/ to /.
Jim