wordpress wp-cache html rewrite rule

Todd Todd lists at ruby-forum.com
Thu Jan 3 03:10:06 MSK 2008

I have a RedHat ES 4 that uses version of PHP 4 without fastcgi support.
I haven't grown out of this server so I am running Apache on port 80 to
serve PHP pages for Wordpress, and Nginx on an alterante port to serve
all the static content. Requests for images are redirected using rewrite
rules in the .htaccess file for each domain. I also use the WP-Cache
Wordpress plugin which generates .html files to serve as static pages. I
am trying to write an Apache 2.x rule to forward the cache located at
{root}wp-content/cache folder to be served by Nginx. Each file for the
cach begins with wpcache- and ends with .html. I've tried the following
rules below, but my expression skills are weak, so the rules are not

RewriteRule ^wp-cache-(.*)$ http://cache.myserver.com:4593/$1 [R=302,L]

RewriteRule ^wp-content/cache/(.*)$
http://cache.myserver.com:4593/wp-content/cache/$1 [R=302,L]

I realize I could just try compiling PHP5 on this server and use Nginx
for the whole site, but for now I want to avoid this since I will setup
another server later this year to handle PHP pages, and leave the static
files on this server. After a lot of effort to resolve this issue on my
own I am finally posting here to see if anyone can assist me.
Posted via http://www.ruby-forum.com/.

More information about the nginx mailing list