Forum: Mongrel .htaccess rewrite rule to mongrel rewrite rule

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6de3daa3f91b7169c85df7702b4fb1d4?d=identicon&s=25 Paddy Rap (rapbhan)
on 2010-08-30 10:19
Hi All,

The application is running on mongrel cluster and its used to serve
different contents for each domain and I had implemented the cache per
domain level using the below plugin:

http://github.com/yeah/page_cache_fu

Now the problem is, since the mongrel bypasses the .htaccess
configuration and I am new to mongrel rewrite rule. So it would be of
great help, if you can let me know the right rewrite rule for mongrel
for the below .htaccess

RewriteMap uri_escape int:escape
    <Directory /path/to/my/rails_app/public/>
      RewriteEngine On
      RewriteCond %{REQUEST_METHOD} GET [NC]
      RewriteCond
%{DOCUMENT_ROOT}/cache/%{HTTP_HOST}%{REQUEST_URI}%{QUERY_STRING}.html -f
      RewriteRule ^([^.]+)$
cache/%{HTTP_HOST}/$1${uri_escape:%{QUERY_STRING}}.html [L]

      RewriteCond %{REQUEST_METHOD} GET [NC]
      RewriteCond %{DOCUMENT_ROOT}/cache/%{HTTP_HOST}/index.html -f
      RewriteRule ^$ cache/%{HTTP_HOST}/index.html
    </Directory>

Please do let me know.

Thank you for your helps!

Paddy
This topic is locked and can not be replied to.