> Specifically, I am trying to create an application which will be "site > aware" (where "site" is a made-up term which implies different > configurations/access/etc.). The "site" will need to be present in the URL > in some form.
I don't know how many sites you are offering, but have you thought about using different domains or subdomains? Then http://site1.mysite.com and http://site2.mysite.com would get you into the different sites for example. By injecting the Request into your pages and components you can determine what to do and there is no need for url-rewriting. We are using a single application to serve a full version of our product and a light-version, which both have their own url. Based on the url you used for accessing the application the correct welcome page/site style is shown and after the user logged in we know which plan (s)he has purchased and can forward the user to correct url. In the light version there are less pages available (the pages of the full version return a 404 if you don't have a subscription to the premium service). Also components can render paths to different pages based on the active version for the user. We are using subdomains to indicate acceptance and test-environment and while developing we support an url-parameter on the home-page to switch site-mode to ease local testing. regards, Onno