RE: [PHP] simple Apache question I'm sure [solved]
| From: | Paul O'Neil | Date: | Sat, 06 Sep 2003 14:48:13 +0000 |
| Subject: | RE: [PHP] simple Apache question I'm sure [solved] | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-161858@lists.php.net to get a copy of this message | ||
Thanks for that answer. that was it. Theres alot going on in apache!
-----Original Message-----
From: David Otton [mailto:phpmail@jawbone.freeserve.co.uk]
Sent: Saturday, September 06, 2003 4:40 AM
To: Paul O'Neil
Cc: php-general@lists.php.net
Subject: Re: [PHP] simple Apache question I'm sure
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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/2003