What are the different parts of a URL?

by on July 29, 2010

Q: What are the different parts of a URL?


One Response to “What are the different parts of a URL?”
  1.  

    If you take http://www.opensourcetutorials.com/tutorials/Server-Side-Coding/PHP/php-variables/page1.html as an example then everything after http:// and before the first / is the domain so http://www.opensourcetutorials.com

    The item after the last slash ie page1.html, is the actual page name.

    Everything between those two items are the directories.

    This does not mean that on the server itself the directory structure is setup like this though because a lot of people modify the URL itself so that it is more search engine friend (ie keyword rich) so they add pieces that look like directories or pages but are really not.

    In short a URL tells your web browser what server to connect to and then it tells the server what specific item you want from the server.