Well you don't actually need the "Site" directory if you don't want it.
My web.config file looks like this:
   <httpHandlers>
      <add path="*.vm" verb="*" type="System.Web.HttpForbiddenHandler" 
validate="true"/>
      <add path="*.haml" verb="*" type="System.Web.HttpForbiddenHandler"/>
      <add path="*.njs" verb="*" type="System.Web.HttpForbiddenHandler" 
validate="true"/>
      <add path="*.aspx" verb="*" type="System.Web.UI.PageHandlerFactory" 
validate="true"/>
      <add verb="*" path="*.*" type="System.Web.StaticFileHandler"/>
      <add verb="*" path="*" 
type="Castle.MonoRail.Framework.MonoRailHttpHandlerFactory, 
Castle.MonoRail.Framework"/>
    </httpHandlers>




________________________________
From: JakeS <[email protected]>
To: Castle Project Users <[email protected]>
Sent: Friday, 4 September, 2009 1:40:50 PM
Subject: Re: Static Content in the Monorail site root


Thanks for the follow up John.  Yes, I managed to get it working
taking a clue from James, but instead of what he wrote I had to add
the following to the web.config's httpHandlers section:
<add path="Site/*.*" verb="*" type="System.Web.StaticFileHandler"/>

On Sep 3, 5:03 pm, John Simons <[email protected]> wrote:
> Jake,
>
> How is this going, have you got it working yet?
> I should have mentioned that the routing in Monorail first checks if
> the requested file physically exists and if it does than it skips the
> routing otherwise performs the routing.
> So in theory you should be able to add static files in your website
> and they should automatically be rendered. Let me know if this is not
> the case/
>
> Cheers
> John
>
> On Sep 3, 3:58 am, James Curran <[email protected]> wrote:
>
> > I believe adding this to your <httpHandlers> section in your web.config:
>
> >      <add path="Site/*" verb="GET,HEAD,POST"
> > type="System.Web.DefaultHttpHandler" validate="True" />
>
> > On Wed, Sep 2, 2009 at 11:22 AM, JakeS<[email protected]> wrote:
>
> > > This is turning into quite a mess.  It's just not this simple.  I have
> > > a set of 10 or so static html files that ALSO include references to
> > > css, javascript, and images.  So inside the html there's something
> > > like this:
>
> > > <link rel="stylesheet" href="css/style.css" media="screen" />
>
> > > So just plopping this whole thing down inside a "Site" view folder
> > > won't work, because then it won't pull the css from in there too.
>
> > > So if I give up on making it the "root" of the site and just redirect
> > >http://mysite.comtohttp://mysite/Site/index.html, is there any way
> > > to tell monorail to ignore a whole subtree?
>
> > > On Sep 2, 10:09 am, JakeS <[email protected]> wrote:
> > >> > I guess you could use routing.  How important is it that the about
> > >> > file appear to be in the root?  In my actual site, the controller for
> > >> > most static text is called SiteController, and I use the path of
> > >> > /Site/About.rails.  (SiteController also contains things like Login()
> > >> > & Logout())  It's not like many people are going to type that address
> > >> > directly into the browser address bar.
>
> > >> The client is very big on "SEO" friendly URLs, so the simpler the URL
> > >> the better.  And it's not just one static page, it's a whole front-end
> > >> marketing site being added onto the back-end application.  So 
> > >> there'shttp://mysite.com/home.html,http://mysite.com/demo.html,http://mysite...,
> > >>  etc.  Having that extra path in the
> > >> URL may frustrate him.
>
> > --
> > Truth,
> >     James


      
__________________________________________________________________________________
Find local businesses and services in your area with Yahoo!7 Local.
Get started: http://local.yahoo.com.au
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to