Support » Plugin: W3 Total Cache » 301 Redirects Not Working With W3 Total Cache

  • Resolved Sarunas

    (@bumerangas)


    Hello,

    My 301 redirects stopped working then installed W3 Total Cache, I also included all redirects to option “never cache these pages” under page cache, but that didn’t help.

    I use Redirection plugin and it don’t make any changes to .htaccess file.

    Any help would be appreciated.

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Update:

    I found the half solution here: http://stackoverflow.com/questions/4814231/301-redirect-not-working-in-wordpress

    I placed this code to .htaccess file below w3 total cache rewrite rules:

    “<IfModule mod_rewrite.c>
    Options +FollowSymlinks
    RewriteEngine on

    ### non www to www
    RewriteCond %{HTTP_HOST} ^domain.com.au [NC]
    RewriteRule ^(.*)$ http://www.domain.com.au/$1 [R=301,L]

    ### re-direct index.html to root
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
    RewriteRule ^index\.html$ http://www.domain.com.au/ [R=301,L]

    redirect 301 /team.html http://www.domain.com.au/our-team/
    redirect 301 /contact.html http://www.domain.com.au/contact-us/

    # WrodPress rules begin here…
    </IfModule>”

    All 301 redirects seems working now and without any errors showing under W3 Total Cache settings, except one: the index.html still not redirecting to .com – all what I see is my hosts 404 error page :/

    and if I remove these lines from the code above:

    “### re-direct index.html to root
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
    RewriteRule ^index\.html$ http://www.domain.com.au/ [R=301,L]”

    W3 total cache throwing error:

    “It appears Page Cache URL rewriting is not working. If using apache, verify that the server configuration allows .htaccess or if using nginx verify all configuration files are included in the configuration.”

    Anybody?

    +

    I tryed to add also:

    “Redirect 301 /index.html http://www.domain.com.au/
    Redirect 301 /Index.html http://www.domain.com.au/

    but then again thse error under W3 total cache “It appears Page Cache URL rewriting is not working. If using apache, verify that the server configuration allows .htaccess or if using nginx verify all configuration files are included in the configuration.”

    W3 Total Cache increased my page speed a lot and I want to continue using it, but these error killing all benefits :/

    Plugin Author Frederick Townes

    (@fredericktownes)

    Have you tried adding the redirects before the rules added by W3TC? Cannot duplicate the issue you are having. Did the Page Cache message appear without rules as well?

    Plugin Author Frederick Townes

    (@fredericktownes)

    Have you tried adding the redirects before the rules added by W3TC? Cannot duplicate the issue you are having. Did the Page Cache message appear without rules as well?

    Yes, I added redirects before W3 Total Cache code, but that not helps because it works only until first cache cleaning.

    Plugin Author Frederick Townes

    (@fredericktownes)

    Consider using preloading.

    Thanks for your support.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘301 Redirects Not Working With W3 Total Cache’ is closed to new replies.