On some .NET driven sites URLs don't end with asp.net page names, like default.aspx, instead they use a pattern http://sitename.com or http://sitename.com/subdirectory/subdirectory. The site is mapped as sub directories off the root, ie. /tags, /users, /badges, the URLs would be /tags, /users, /badges respectively.
Stack Overflow, to use a specific example, uses question URLs of the form How do get clean URLs like Stackoverflow?. Which is great way to optimize the page for search engines.
Is this implemented using HTTP handlers? Is the GET request filtered based on path and the whole response is formed in the handler itself based on the question id? Anyone else care to speculate?
A clean URL is less intimidating to a human user. They can look at it and get an idea what the page is about. Clean URLs are also more sharable. Being short and meaningful, they are more pleasing to the eye and more likely to be shared on Twitter, Facebook, or other sites, and via email.
It specifies an "Anchor", or a position on the page, and allows you to "jump" or "scroll" to that position on the page.
It's ASP.Net MVC, which has the .Net Routing more or less built in. The Routing is available for non MVC projects as well, though
http://msdn.microsoft.com/en-us/library/cc668201.aspx
It's just a .dll you can drop in your bin folder. Basically it uses regular expressions to match your URL's to pages/templates.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With