Forum Moderators: DixonJones

Message Too Old, No Replies

The "?" as in index.html?

Who puts them there and Why?

         

pendanticist

3:47 pm on Dec 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



209.214.170.** - - [07/Dec/2003:19:23:07 -0800] "GET /index.html[b]?[/b] HTTP/1.1" 200 20402 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"

While it is true, I do have and index.html in no way do I have a "?" at the end.

Assuming they typed it in, any ideas what they want to do, or what they're trying to see?

Thanks.

Pendanticist.

lorax

3:59 pm on Dec 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I've seen that too and just assumed they were looking for a certain server response that would occur if you add the?. But that's about as far as I got in pursuing it. Now I'm more curious. Could it be just a typo?

pendanticist

8:00 am on Dec 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>Now I'm more curious. Could it be just a typo?

If I add a "?" trailing my .html it renders a 200 as well. (Didn't know that the other day.) Whereas I'd have thought the request would render a 404 since the requested file simply does not exist.

Many of my URLs utilize both case and if a request is made of the server for an all lower-case file (where that file is mixed case), it will be served a 404.

(e.g.)

This_File_Extension

vs.

this_file_extension

Any url other than those actually published to the Internet should not be accessible, correct?

Just one of the miriad of oddities, I suppose. Who knows...

Thanks.

Pendanticist.

limitup

8:07 am on Dec 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



? designates the beginning of the "query string" - it is not considered part of the URL itself which is why it won't generate a 404 error.

jpjones

8:12 am on Dec 10, 2003 (gmt 0)

10+ Year Member



Some people use it as a way of requesting fresh content from the server, in the case that there is a proxy server between themselves and the website.

How? Why?
Because adding a? to the end of the URL doesn't actually change the page content (in the case of dynamic URLs), but makes the URL look different to the proxy server, this technique sucessfully retrieves a fresh copy.

JP

jdMorgan

8:20 am on Dec 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The "?" denotes the beginning of a query string to be passed to a script. This is used on many sites where the "page" that you see is generated by a script depending on what parameters follow the "?". That script could conceivably be called index.html, and a URL rewrite could be used to internally redirect it to index.php, for example.

In the case shown, the query string is empty. Since it is not considered to be part of the URL-path, the server responds with a 200-OK.

Many dynamic sites use this type of setup, for example, putting a session ID there to track the user through the site and associate that user with a particular "shopping cart." However, search engine spiders don't do a good job of spidering URLs with many query-string parameters, which is why there is always a booming business here in questions about how to use static-looking URLs on a dynamic site.

Since there was no referrer -- meaning it could very well be a type-in URL -- jpjones' explanation seems likely for this case.

Jim

mbauser2

5:35 am on Dec 11, 2003 (gmt 0)

10+ Year Member



If I add a "?" trailing my .html it renders a 200 as well. (Didn't know that the other day.) Whereas I'd have thought the request would render a 404 since the requested file simply does not exist.

The file does exist -- "?" indicates the end of the file name and the beginning of a CGI query string. (As per the spec [hoohoo.ncsa.uiuc.edu]: "QUERY_STRING is defined as anything which follows the first? in the URL.") Whether or not the file is actually capable of parsing the query string is a separate issue.

Any url other than those actually published to the Internet should not be accessible, correct?

Incorrect; that wouldn't allow for support of server scripts with free-form input.

pendanticist

1:22 am on Dec 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Very interesting reading folks.

Thank You one and all. :) I appreciate the time you all took to enlighten me.

Pendanticist.