Custom View Engine Request
<p>I am creating a CMS where there are multiple themes.  So, I created multiple folders inside of the View (3 folders: A, B and C).  Each folder has Home, Contact Page, etc, but they are all DIFFERENT themes that use the same models.  (example multiple different HTML themes)</p>

<p>Multiple sites use this system and in teh database I created a table that contains Web Site ThemeID and domain.</p>

<p>So,</p>

<p>I created a custom view engine that would query the database based on the URL and return a theme id....then using an IF statement I am selecting what folder to set the routes to.</p>

<p>It was working great local...but when I deployed I started getting Request is not available in this context referring to httpcontext.request.url</p>

<p>It won't let me find the ROOT url before the ViewLocationFormats, MasterLocationFormats and Partial has been called.</p>

<p>So, I can't look in the correct folder to get the theme.</p>

<p>Any advice???</p>

<p>How can I get the root URL before I set the views</p>
