• Resolved Mike

    (@maddogmike)


    Before installing W3TC, if I typed in my domain.com (without www) it would automatically redirect to https://www.domain.com. Once activating W3TC, that redirect no longer works. If I deactivate W3TC, it works again.

    With W3TC activated, if I clear all caches and try it, the first time the redirect works, but after that it doesn’t. Is that normal? I know others who have W3TC and their redirect still works, so I’m confused. How do I fix this?

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter Mike

    (@maddogmike)

    Yeah, I mentioned in my second post that I could add those last two lines to my htaccess as a work-around, but I thought that wasn’t supposed to be necessary in WordPress. I mean, the re-direct works without those lines in my htaccess as long as W3TC is deactivated.

    Could Frederick please chime in and let me know if that’s the suggested work-around, or is W3 working on a fix?

    thanks,
    Mike

    Thread Starter Mike

    (@maddogmike)

    OK, decided to go ahead an add the additional rewrite rules in my .htaccess as a work-around. Well, the redirect works on the home page, but not on any of the internal pages.

    Again, if I deactivate W3TC, the redirects work fine on all pages, again confirming that W3TC is the culprit.

    Also, if you deactivate W3TC and later reactivate it, it will push your rewrite rules down in your .htaccess, necessitating that you move them back up to the top again manually. (Which again doesn’t fix the problem anyway so what’s the point?)

    I’m trying to stay diplomatic here, but it’s pretty frustrating when I’m getting no response to multiple posts and bug ticket submissions.

    Thread Starter Mike

    (@maddogmike)

    Got my answer (thanks Frederick, I’m sure you’re a busy man). He said just to do like I stated in my second post, add this to the top of htaccess:

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

    I still don’t understand why it’s necessary to modify htaccess with W3TC activated, since the redirect works without those extra lines in htacess when W3TC is deactivated. Seems like that should be something that’s mentioned in the documentation. Whatever, at least it’s working now.

    Bump

    Any update on this? I just figured out this plugin was what was causing my problem today.

    The problem most likely persists when bespoke .htaccess rewrite/redirect rules (outside of the standard WordPress one) exist in the .htaccess file. W3TC can’t be expected to handle every exception.

    What I do wonder, is why it cancels the internal WP rewrite that is supposed to manage www/no-www redirection – this is something that the plugin author could work to fix.

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘[Plugin: W3 Total Cache] non-www redirect fails with W3TC activated’ is closed to new replies.