I am looking for some clarification on GET. If I have a URI such as https://google.com/something/
and I try to access that webpage, web servers interpret this as a GET request for /something/
rather than a GET for
https://google.com/something/
? Server access logs will commonly only log the /something/
part when visitors access the site. Yet, if I perform a curl on that full address, the internet tells me that curl is preforming a GET on the full URI. As such... what is the distinction here?
Also, what exactly does the shortened address, /something/
, represent? Is it a file that resides in the root of the website being accessed? What if I set up a rewrite for /something/
to 301 to a particular address and /something/
is not actually a file or directory; how is a request like that processed?
And lastly, is https://username:[email protected]/
still the standard for accessing a website over https with http auth?
The HTTP request sent would look like this:
curl
will show you what it's sending, add-v
.That's completely up to the server handling the request. All the protocol dictates is that the client is asking for the content at that location - what the server responds with is completely up to the server's implementation.
This is one method of setting credentials to be used for basic auth; most HTTP clients will prompt for credentials if requested by the server.