I'm a complete web novice but I couldn't help notice that some web sites that generate a lot of content (such as www.stackoverflow.com) often seem to navigate to specific items via the path.
For example clicking on discussion item "blah-blah-blah" in www.whatever.com/discusions will often link to URL with a pattern of www.whatever.com/discussions/123456/blah-blah-blah.
I'm somewhat familiar with the GET/POST, and passing parameters via www.whatever.com?discussion=blah-blah-blah, but a search via google on this method has not been very fruitful. I'm assuming the number in the path is a database ID, but after that I'm just guessing. I'm wondering if a separate web page is created for each item, but that seems redundant, but then again maybe it's an SEO technique.
Anyone dare to elaborate?
views:
30answers:
3You should check out the whole RESTful concept that really took off when Web2.0 became big.
A URL is just a locator. It doesn't need to specify a filesystem path on the server, so what exactly a URL means, is up to the application behind it. Depending on how this is implemented it may just be a bunch of rewriting rules (Drupal uses this, for example) or something more elaborate not being tied directly to any files on the server (which ASP.NET MVC uses with routes, if I am not mistaken).
Whether or not search engines may find URLs of this kind more useful may be debatable (I don't believe it has any effect), but those URLs surely make more sense to people reading them.
the number is the post id in the database. It's put into the web address to avoid collision of the question names. No, no separate web page is created. The server reads the url, parses it, analyses it and then serves content. Things like apache rewrite module are used to substitute these "web paths" for real paths.