Skip to content

Instantly share code, notes, and snippets.

@ihower
Created May 7, 2009 10:08
Show Gist options
  • Save ihower/108038 to your computer and use it in GitHub Desktop.
Save ihower/108038 to your computer and use it in GitHub Desktop.
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
# Rewrite index to check for static
RewriteRule ^/$ /index.html [QSA]
# Rewrite to check for Rails cached page
RewriteRule ^([^.]+)$ $1.html [QSA]
# Redirect all non-static requests to cluster
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]
#
RewriteCond %{QUERY_STRING} ^([^"]+)"(.*)
RewriteRule ^/(.*) /$1\?%1\%22%2 [N]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment