httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
Subject Re: [users@httpd] Virtual Hosting: One website doesn't work.
Date Sun, 04 Jan 2015 00:34:53 GMT
On Sat, 03 Jan 2015 12:19:38 -0500
ghalvors78@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-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message