WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: W3 Total Cache] .htaccess - any duplicate entries added? (4 posts)

  1. Taragon
    Member
    Posted 4 years ago #

    Hello,

    After some minor installing difficulties -the manual creation and chmodding of the folders w3tc and w3tc/pgcache- I noticed some changes to my root .htaccess file.
    Which is understandable, as this is how it was suppose to act.

    I however have the feeling there are some duplicates listed now, and here just asking to be sure.

    # BEGIN W3 Total Cache
    <IfModule mod_setenvif.c>
        SetEnvIfNoCase Accept-Encoding (gzip) APPEND_EXT=.$1
    </IfModule>
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{REQUEST_URI} \/$
        RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register).php|wp-.*\.php|index\.php) [OR]
        RewriteCond %{REQUEST_URI} (wp-comments-popup\.php|wp-links-opml\.php|wp-locations\.php) [NC]
        RewriteCond %{REQUEST_METHOD} !=POST
        RewriteCond %{QUERY_STRING} =""
        RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|wordpress_\[a-f0-9\]\+|wordpress_logged_in) [NC]
        RewriteCond %{HTTP_USER_AGENT} !(bot|ia_archive|slurp|crawl|spider) [NC]
        RewriteCond /home/taragon/public_html/wp-content/w3tc/pgcache/$1/_default_.html%{ENV:APPEND_EXT} -f
        RewriteRule (.*) wp-content/w3tc/pgcache/$1/_default_.html%{ENV:APPEND_EXT} [L]
    </IfModule>
    # END W3 Total Cache
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule .* index.php [L]
    </IfModule>
    # END WordPress
    
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
    RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    Presumably, I could comment out this?

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule .* index.php [L]
    </IfModule>
    # END WordPress

    Kind regards,

    Cor

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. Frederick Townes
    Member
    Posted 4 years ago #

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    Are not standard WordPress rules, so you don't need them.

  3. Taragon
    Member
    Posted 4 years ago #

    Hello Frederick,

    Thank you for your reply. I'm currently using WordPress 3.0 Beta 1, which probably explains the difference.

    I currently have yours commented out, and it seems to work.

    Again, much appreciated.

  4. Frederick Townes
    Member
    Posted 4 years ago #

    Ok great.

Topic Closed

This topic has been closed to new replies.

About this Topic