Here's a page which explains how URLs are made up:
http://hybridchill.com/anatomy-of-a-url.html
And here's how your URL divides:
Protocol = http
Server = //localhost
Script Name = /students/index.cfm
Path Info = /register
Query String = action=studentreg
It's possible (but unlikely) that "students" is a context not part of the
script name.
It's also possible (but even more unlikely) that index.cfm is a directory name
and register is the script.
If you're running the code yourself, you can open up index.cfm and do...
...and you'll see the various variables including those mentioned in the page
above.
Especially in the past, a lot of things used the Query String (which starts
after the first ?) for things which *should* have used Path Info - mostly
because Path Info was neither properly understood nor implemented in many
servers, and server-side languages didn't make it as easy to work with as with
query string.
Path Info was designed for identifying which file to display (different to
which script to process with), whilst Query String was intended for querying
(searching) in some way. Because it was easier, nearly everyone lumped
everything into the query string.
There is no default format or imposed use to Path Info, so it is entirely a
case of how the developer implemented it.
It's possible it could be used for an application name, but I've never seen
that done.
It's likely to be the name of a page or section, which may or not be stored in
a database. I've not encountered any CMS that constructs URLs in the way of
your URL.
Due to the intended purpose of the Query String, early search engines initially
ignored everything after a ? when spidering URLs, but when Google arrived on
the scene, it wasn't long before they had started working out which variables
in a query string identified pages.
At some point, a fad started of moving ALL variables (including ones which
*should* stay in the query string) into the Path Info section, and claiming
this was "search engine friendly" or "search engine safe". (I'll try to avoid
ranting on how stupid both these terms and practise is.)
Mostly outside the CF community, people were already achieving the same thing
using URL rewriting (using Apache mod_rewrite, IIS ISAPI rewrite, or similar),
which treats everything after the Server before the Query String as a single
virtual path, converted into a script name and (potentially) query string
variables - which meant there was no need for "index.ext" to be used.
This is generally called things like "pretty URLs", "vanity URLs", or similar
terms - which more accurately reflect that they are (should be) done for HUMAN
benefit (not search engines).
That's starting to drify off the original topic though, so I'll stop now... I
think I've covered everything, and hopefully this all makes sense? Let me know
if anything I've written is unclear?
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343639
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm