WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: WP Super Cache] Wp-super cache htaccess (3 posts)

  1. Yemoonyah
    Member
    Posted 5 years ago #

    Hi

    I installed wp-super cache, enabled it and it said it was caching. But my site is still slow and so I checked my htaccess and it doesn't look like it should:

    RewriteEngine on
    # Use PHP5 as default
    AddHandler application/x-httpd-php5 .php
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress
    RewriteCond %{HTTP_REFERER} !^http://kabai33.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://kabai33.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.kabai33.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.kabai33.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^$
    RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]

    I know there is an example htaccess file on the plugin page but I'm really not sure exactly what I have to add where in my htaccess.
    Could anyone please help?

    Thanks in advance

  2. Donncha O Caoimh
    Member
    Posted 5 years ago #

    You should add the example htaccess rules above the block that begins "# BEGIN WordPress"

    That should start the supercache working.

  3. Yemoonyah
    Member
    Posted 5 years ago #

    Thank you for the help.
    It is much appreciated.

    This is what I did:

    "RewriteEngine on
    # Use PHP5 as default
    AddHandler application/x-httpd-php5 .php

    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*s=.*
    RewriteCond %{QUERY_STRING} !.*attachment_id=.*
    RewriteCond %{QUERY_STRING} !.*wp-subscription-manager=.*
    RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
    RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]

    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*s=.*
    RewriteCond %{QUERY_STRING} !.*wp-subscription-manager=.*
    RewriteCond %{QUERY_STRING} !.*attachment_id=.*
    RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress
    RewriteCond %{HTTP_REFERER} !^http://kabai33.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://kabai33.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.kabai33.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.kabai33.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^$
    RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]"

Topic Closed

This topic has been closed to new replies.

About this Topic