Support » Developing with WordPress » wordpress wp-cache html rewrite rule

  • hollywoodgrind


    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 cache 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 working.

    RewriteRule ^wp-cache-(.*)$$1 [R=302,L]

    RewriteRule ^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.

    I have also considered that WP-Cache may need to be modified so that .html pages are forwarded to the Nginx server, and PHP pages are loaded by Apache, rather than both .hmtl and PHP being loaded by Apache. I’m just not sure where in the code it would need modification, or exactly how to write it.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘wordpress wp-cache html rewrite rule’ is closed to new replies.