Using context directives for static stuff of Rails app

Discussion in 'Install/Configuration' started by ostraaten, Sep 1, 2008.

  1. ostraaten

    ostraaten Member

    I have some static files in my Rails application that I don't want LiteSpeed to handle with the Rails module, it should just be served as static content.

    I have configured it as below. Is this correct? I assigned the Rails context last in the ordering (position 7).

    Rails / 7
    Static /wikis/ 6
    Static /bp/ 5
    Static /images/ 4
    Static /javascripts/
    Static /stylesheets/
    Static /uploads/ 1

    Another question I have concerns page caching. Ideally I would also like to have page fragments served as static content. So this would mean for example that I add something like /pages/view/ before / (the Rails context). This would mean that LiteSpeed will serve the request from /pages/view unless the file cannot be found. If it isn't found the request will be handled by the Rails module (and the cache file will be created).

    Thanks and Regards,
  2. mistwang

    mistwang LiteSpeed Staff

    By default, a request will be handled by Rails when file does not exist. the order of static context does not matter unless it is a regex matching context.

Share This Page