Change this nginx rewrite to apache htaccess

Milli Sami lists at
Tue May 26 18:48:00 MSD 2009

The following post explains about the page caching in rails with Nginx.

I like to implement this solution with my app but on Apache. So, the
main block/route is

  if (-f $request_filename) {
    if (-f /cache$request_filename) {
    rewrite (.*) /cache$1 break;

  if (-f /cache$request_filename.html) {
    rewrite (.*) /cache$1.html break;
What could be the Apache equivalent for the above Nginx related code??
Posted via

More information about the nginx mailing list