• I have some existing .htaccess rules to deal with backwards compatibility with older versions of my blog – in particular, I use a rewrite to match image URLs that used to be in the home directory to go to a new /images directory. Subsequent to installing WP2.8 + WP-super cache, this worked fine, but now it doesn’t (I just get a not found response). Is there something in the WP-supercache rules that is causing this to break?

    Old rules (prior to WPSuperCache rules):

    RewriteEngine On
    RewriteBase /
    RewriteRule ^([^/]*)\.pdf /docs/$1.pdf
    RewriteRule ^([^/]*)\.jpg /images/$1.jpg
    RewriteRule ^([^/]*)\.jpeg /images/$1.jpeg
    RewriteRule ^([^/]*)\.png /images/$1.png

    and WPSuperCache rules (afterwards):

    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    AddDefaultCharset utf-8
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{DOCUMENT_ROOT}/home/realc/webapps/htdocs/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
    RewriteRule ^(.*) /home/realc/webapps/htdocs/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]
    
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{DOCUMENT_ROOT}/home/realc/webapps/htdocs/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    RewriteRule ^(.*) /home/realc/webapps/htdocs/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
    </IfModule>
    # END WPSuperCache

    Any suggestions welcomed!

The topic ‘[Plugin: WP Super Cache] existing .htaccess rules and supercache’ is closed to new replies.