Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I make ASPX Web pages without file extensions?

Tags:

url

asp.net

I have notice that stackoverflow.com does not have file extensions on their pages. How would I do this with an aspx web site?

like image 575
Your Friend Ken Avatar asked Jul 14 '09 20:07

Your Friend Ken


People also ask

Which file extension is used for asp net web form files?

Web forms are contained in files with a ". aspx" extension; these files typically contain static (X)HTML markup or component markup.

What is ASPX in URL?

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.

How do I hide an ASPX file?

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.


2 Answers

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.

like image 184
Keith Adler Avatar answered Oct 04 '22 22:10

Keith Adler


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.

like image 34
atfergs Avatar answered Oct 04 '22 22:10

atfergs