Re: simple Apache question I'm sure

From: Date: Sat, 06 Sep 2003 11:40:29 +0000
Subject: Re: simple Apache question I'm sure
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-161855@lists.php.net to get a copy of this message
On Fri, 5 Sep 2003 20:30:22 -0700, you wrote: >This is more Apache related but I have a php/apache config'd box at home I >want to test stuff out on before uploading to a public server. Every >directory except wwwroot dir I must place a '/' after the dir name to get a >listing such as http:://192.168.1.1/mydirectory will not load >the index.php >file until I type in the '/' like so >http://192.168.1.1/mydirectory/ what >gives? [Assuming that "::" is a typo] "http://192.168.1.1/mydirectory" is an invalid URL - that resource doesn't exist on that server. When a server receives a request for "http://example.com/some/dir", instead of throwing a 404 error it politely issues a 301 (Moved Permanently), telling the browser to go to "http://example.com/some/dir/" instead. The "example.com" bit is taken from httpd.conf. Look for the line: ServerName example.com to modify. Your request for "http://192.168.1.1/mydirectory" is being 301'd into "http://example.com/mydirectory/" This is why leaving training a '/' off a URL is a bad idea, even though it appears to work - it causes a second HTTP roundtrip before you get your file.

« previous php.general (#161855) next »