Tip:
Highlight text to annotate it
X
Let's talk about the basic anatomy of a URL. Here's the URL for this page.
Let's copy it out so you can see it better.
The first thing you'll notice that it begins with "http://".
This is an identifier of the protocol that you're using to
ask for a page. It's usually a http://. Sometimes
https, which is for secure servers, and you can actually put other things
up here as a protocol. Most browsers will allow you to put ftp, for example, as a
protocol.
Depending on the plugins you have, you can do other protocols. But this is pretty common:
http:// .
The next section after this
pair of slashes
is uh...
the domain of the server that you're trying to reach in order to get the document.
So right now we're looking for
the document at www-sul.stanford.edu.
That's the machine that we want to get the document from.
The next set of
slashes are the directory
in which you're going to find the file. So in this case it's actually a
directory inside of a directory inside of a directory.
And so you have the "web root" which we'll talk about in a later tutorial. Within
that we're looking for the "departments"
directory or folder.
Within the department folder we're looking for the "spc" folder
and within that folder or looking for the directory
"fuller." I'm using "directory" and "folder" interchangably here. So we're looking for this
particular directory. So this complex is kind of go through the
the steps to get to that directory so that we can find it.
The next step is to look for the file itself. There is probably a bunch of files here
inside the "fuller" directory.
And we're saying we want to display the "faq.html" file. The .html
is an extension but all this is part of the file name; in this case it's an html
file we're pulling up.
Note that we could do another file, index.html.
Every site will have an index.html
and so we can expect to find index.html here in the full "fuller" directory. And in fact
we do it's this right here.
This is important.
We can actually omit the index.html and the browser will assume that
what we want is the index.html file. So in this case we haven't put index.html,
but it is the exact same uh...
page as if
we have included the index.html.
So index is the assumed page that you want to go to
if you don't specify a file name.
We haven't touched on a lot of things uh... For example,
if I search
for "monkeys"
and you look at the URL appear, it's a scary one. It's, kind of, a long long interesting
set of...
actually, variables. In fact, we can find a
"q = monkeys" here: the query that we made to the search engine
And we'll talk more about that when we start to talk about programming in PHP.
You can also, although this is done very rarely, include the username and password within
the URL itself,
and you can look into ways that you can do that.
So that's the basic description.
As we will find later on with content management systems sometimes the URL doesn't actually
align with the directory structure of a server but generally that's where we start from--that's
the starting point.