Opening webpage based on URL path passed

Is there a way I can open a specific webpage based on a path or data in the URL opened, eg

www.website.com - opens main site
www.website.com/custom page - opens the custom page?

You can access parameters from with Session.Open, so if the url were

Http://your domain.com/?page=WebPage1 you could tell it to go to that page.

Now, if you want a url like the one you described, you can intercept the request in App.HandleURL and if Request.Path = “webpage2” you could tell the browser to redirect to the version with the parameter.