I have notice that stackoverflow.com does not have file extensions on their pages. How would I do this with an aspx web site?
Web forms are contained in files with a ". aspx" extension; these files typically contain static (X)HTML markup or component markup.
What is an ASPX file? A file with . aspx extension is a webpage generated using Microsoft ASP.NET framework running on web servers. ASPX stands for Active Server Pages Extended and these pages are displayed in web browser at user end when the URL is accessed.
In this article I will explain how to hide (remove) . ASPX extension in URL in ASP.Net. There are two ways to do it namely URL Rewriting and URL Routing. URL Rewrite works in IIS Servers while URL Routing can be implemented within ASP.Net code inside Global.
Here's a great article from Scott Guthrie:
http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx
It covers off all scenarios: IIS 6, IIS7, using third party URL rewriting tools, etc.
The URLs aren't actually pointing to files. They're using URL rewrite rules to convert the URL to a database query and feed the output back to a specified page (whose URL isn't displayed).
Edit: For clarification SO uses MVC, so the url is pointing to a specific controller action (with or without parameters, depending on the page). The action runs some code to grab data or whatever and passes it to a corresponding view, which is basically an html template that fills in the info provided by the action and renders the page.
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