PathInfo – Url Rewriting for the Simple

Request.PathInfo gives you what is past the file name but before '?' which starts the query string.  So instead of doing you could do  This helps a lot with SEO because search engines will think they are different pages. 


When I go to the URL http://localhost:64245/PathTest/Default.aspx/foo/bar (my development environment server) I see a PathInfo like I show below:



If you want more control over your URL rewriting or want to get rid of the .aspx in the URL you will need to take a different approach. I suggest you take a look at UrlRewriter.NET.

Skip to main content