PDA

View Full Version : page redirection ??



skidawg
08-15-2006, 11:34 PM
OK, I just ran across something I thought was strange and wanted to know if this was normal for apache or if HostPC was doing something.

On one of the sites that I am working on, I can go to http://www.wellsvilledays.com/booth and it will load the page http://www.wellsvilledays.com/booth.php

There is not a subdirectory called booth and as far as I can tell there isn't any redirection that I have in place.

After some more testing, I am seeing this same thing on some other sites that I am working on, even on some .html pages (like http://www.dscweb.net/textcolors) and some .shtml pages (like http://www.massmarineeducators.org/bhe2006)

What's going on here? Is this a feature of apache or is this something that HostPC has enabled?

Sean
08-15-2006, 11:37 PM
Browser is doing it. :)

eugene
08-16-2006, 12:13 AM
Normal behavior.

skidawg
08-16-2006, 12:39 AM
Then why does it not work on my development server that I am running at home. The same reqest on my development server gives an error unless I add the extension. If that is the browser correcting the page request, then shouldn't it also work on my development server?

francesco
08-16-2006, 09:08 AM
http://www.wellsvilledays.com/booth

GET /booth HTTP/1.1
Host: www.wellsvilledays.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.5) Gecko/20060714 SeaMonkey/1.0.3
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.hostpc.com/community/showthread.php?t=2699

HTTP/1.x 200 OK
Date: Wed, 16 Aug 2006 12:53:17 GMT
Server: Power MOD by web4host.net
Content-Location: booth.php
Vary: negotiate
TCN: choice
X-Powered-By: PHP/4.4.1
Keep-Alive: timeout=5, max=500
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
I included above the dump of the headers.
There's no redirection going on, it's just the server that handles location /booth as if it were /booth.php.
Why is that, I have no idea. Maybe it's a module installed on the server or the url-rewriting engine.

(Edited for correcting typos)

eugene
08-16-2006, 11:14 AM
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.14
Content-Location

Sean
08-16-2006, 05:48 PM
It's simular to if you type in / or /index or /index.htm/html/php/asp etc.

If you had a folder called /booth it would go there, but you don't..you have a file called booth.php (if you had booth.htm or html it would display that first), so it's defaulting to that.

skidawg
08-17-2006, 08:36 PM
Eugene and Sean,

Thanks for the info. I hadn't seen that information before.