WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] HP redirection to wp-content/w3tc/pgcache/_default_.html (6 posts)

  1. avatarworf
    Member
    Posted 4 years ago #

    W3TC v0.8.5.2

    Hello, I have a strange redirection occuring when I request http://www.domain.com instead of domain.com.

    http://www.domain.com gives a redirection to "http://domain.com/wp-content/w3tc/pgcache/_default_.html

    I do have a rewrite entry in my root .htaccess file as follows

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

    Could this be causing the problem?
    Cheers,
    --Andrew

  2. efikim
    Member
    Posted 4 years ago #

    Without knowing the rest of your configuration, its likely that if an attempt was made to load "http://www.domain.com/wp-content/w3tc/pgcache/_default_.html" then yes, the rewrite rule would cause that redirect

    (I have the inverse rule, but broader - switching *.domain.com to http://www.domain.com - and that caused me similar issues)

  3. avatarworf
    Member
    Posted 4 years ago #

    Sorry the attempt to load a page was to http://www.domain.com/ - it must be w3tc which redirects to the cache page

  4. efikim
    Member
    Posted 4 years ago #

    no, if w3tc tries to load the cache page from www.* then that will be caught by the .htaccess rule and redirected.
    What puzzles me is why w3tc would see the http://www.domain.com address in the first place - my understanding of .htaccess rules (admittedly shaky!) would mean that w3tc wouldn't see the request as being for http://www.domain.com but for http://domain.com

  5. avatarworf
    Member
    Posted 4 years ago #

    Thanks, Figured it out... the root .htaccess needed to have my WWW / non-WWW directive first before the list of W3 Total Cache

  6. Frederick Townes
    Member
    Plugin Author

    Posted 4 years ago #

    Right, that's no longer a problem in the development release.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic