should query string followed by a file name?

D

David Dorward

When we google for some keywords, the current URL will become
http://www.google.com/search?hl=en&q=query+string
My question is should the query string (?hl=en) always followed
by a file name?

I think you mean "Should the query string always follow a filename". How the
server maps URLs on to whatever it gets its data from is irrelevant to the
end user and need only concern the developer, but it doesn't need to
include a filename, and doesn't even need to map onto a file.
 
R

Roedy Green

D

David Dorward

(e-mail address removed) wrote:

Please do not top post.
http://www.faqs.org/rfcs/rfc1855.html
http://www.allmyfaqs.com/faq.pl?How_to_post
Yes, for the URL http://www.google.com/search?hl=en&q=query+string, I'd
expect it has the file name as follows:

Perhaps, perhaps not. Files to not have to have file extensions, the HTTP
resource "/search" could trigger something built directly into the
webserver, it could be the name of another server on an internal network to
forward the request to, it could ... etc etc.
 
T

Toby Inkster

David said:
Perhaps, perhaps not. Files to not have to have file extensions, the HTTP
resource "/search" could trigger something built directly into the
webserver,

On the case of Google, I'd be *shocked* if it wasn't an extension built
directly into the server.

Much like many Apache servers have a "/status/" which is built directly
into the server. (Though the URL can be changed, or the feature disabled
altogether in the configuration file.)
 
E

ExGuardianReader

Yes, for the URL http://www.google.com/search?hl=en&q=query+string, I'd
expect it has the file name as follows:

http://www.google.com/search.jsp?hl=en&q=query+string
or
http://www.google.com/search.asp?hl=en&q=query+string

You said it doesn't need to map onto a file. You meant search no need
to be a file? search should be a file to handle the HTTP requests from
the browser. Is that correct?

URLs do not have to be based on file names. They are just identifiers
used by the server to decide what to send back to your browser. By
convention, webservers serve up files from a default directory when sent
something like: http://example.com/file.html, but that's just
convention. Upon receipt of that URL, the server at example.com might do
absolutely anything.

A URL might be completely incomprehensible to you, but still meaningful
to the server. It's the server's decision to look at the URL and decide
what to make of it, and what to send back.

For example Webcrossing URLs:

http://talk.guardian.co.uk/WebX?14@[email protected]

No filename here, just information encoded into the URL which the server
understands.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top