On Sat, 03 Jan 2015 12:19:38 -0500
ghalvor...@hushmail.com wrote:

> I'm making a guess here.  Are you asking whether I assign Host: as being 
> example.com or www.example.com?  Here's the script from each.  They are 
> slightly different, but the result is the same.

Not actually the same ...

> 
> $ telnet www.example.com 80
> Trying 104.236.xxx.yyy...
> Connected to example.com.
> Escape character is '^]'.
> get / http/1.1
> Host: www.example.com
> 
> HTTP/1.0 301 Moved Permanently
> Date: Sat, 03 Jan 2015 17:07:37 GMT
> Server: Apache/2.4.10 (Ubuntu)
> X-Powered-By: PHP/5.5.12-2ubuntu4.1
> X-Pingback: http://example.com/xmlrpc.php
> Location: http://example.com/
> Content-Length: 0
> Connection: close
> Content-Type: text/html; charset=UTF-8

That redirect is issued by your PHP script.

> $ telnet www.example.com 80
> Trying 104.236.xxx.yyy...
> Connected to example.com.
> Escape character is '^]'.
> GET / HTTP/1.1
> Host: example.com
> 
> HTTP/1.1 301 Moved Permanently
> Date: Sat, 03 Jan 2015 17:06:38 GMT
> Server: Apache/2.4.10 (Ubuntu)
> Location: http://www.example.com//
> Content-Length: 317
> Content-Type: text/html; charset=iso-8859-1

... whereas that looks like a server redirection
with a stray extra slash, and is probably generated
from your apache configuration.

Decide which you want to use, then configure your server
and your PHP to agree on it.

-- 
Nick Kew

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to