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 www.foo.com/bar.aspx?var1=value you could do www.foo.com/bar.aspx/var1/value.  This helps a lot with SEO because search engines will think they are different pages. 

 

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

 

path

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.