[Mongrel] Apache Re-Write and Directories

13 one.three at gmail.com
Tue Oct 3 02:19:03 EDT 2006


Hi,

In your example what is meant by static (file, directory) ?

--
Martins

On 10/3/06, HH <lists at lastonepicked.com> wrote:
> Howdy,
>
> I am using the 'default' Apache 2.2 mod_rewrite rules suggested from the Web
> site and they are working.
>
> One thing related to static (non cluster directed) resources:
>
> If I have a directory in public called 'static', if I request it as follows:
>
> http://www.domain.com/static/  - then it works
>
> If I request it as:
>
> http://www.domain.com/static - then it does not work as it gets directed to
> the cluster.
>
> How can I change my rewrite rules to have both of the above URLs be served
> by the static resource via Apache, not by Mongrel?
>
> Rewrite rules:
>
>   RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f
>   RewriteCond %{SCRIPT_FILENAME} !maintenance.html
>   RewriteRule ^.*$ /maintenance.html [L]
>   # Rewrite index to check for static index.html
>   RewriteRule ^/$ /index.html [QSA]
>   # Rewrite to check for Rails cached pages with .html extentions
>   RewriteRule ^([^.]+)$ $1.html [QSA]
>   # All dynamic requests get sent to the cluster
>   RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
>   RewriteRule ^/(.*)$ balancer://cluster%{REQUEST_URI} [P,QSA,L]
>
> Thanks!!!
>
> Hunter
>
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>


More information about the Mongrel-users mailing list