WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: W3 Total Cache] WWW and Non WWW causing issues in W3TC (20 posts)

  1. remotay
    Member
    Posted 4 years ago #

    I see a problem about www and non-www page.
    I think it is caused by the newest W3 Total cache?

    Here is my HTAccess

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www.rpgmusic.org$ [NC]
    RewriteRule ^(.*)$ http://rpgmusic.org/$1 [R=301,L]

    but this is starting to redirect me to a unique page (when using WWWs):

    http://rpgmusic.org/wp-content/w3tc/pgcache/_default_.html.gzip

    Though the above page with gzip extension works but Why can't it redirect to the regular page?

    This may be caused by the latest update as I don't recall having this problem before

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

  2. Frederick Townes
    Member
    Posted 4 years ago #

    Responded to your bug submission. This issue is related to the order of directives in your .htaccess file.

  3. remotay
    Member
    Posted 4 years ago #

    Excellent. Once you told me the issue was with the ordering of directives, the issue was obvious. I didn't submit the report. Someone else did.

    To those having this issue - simply put the remove WWW directive in the .htaccess as the first directive (Rather than the W3 Total Cache directive).

  4. Frederick Townes
    Member
    Posted 4 years ago #

    Thanks remotay.

  5. MrGroove
    Member
    Posted 4 years ago #

    @Remotay - Yup, that's how I fixed the same problem.

    Users going to http://groovypost.com were redirected to: http://www.groovypost.com/wp-content/w3tc/pgcache/_default_.html.gzip instead of just http://www.groovypost.com

    I modified the location of the remove www directive in .htaccess and problem fixed.

  6. Frederick Townes
    Member
    Posted 4 years ago #

    Great.

  7. centepines
    Member
    Posted 4 years ago #

    I'm sorry, I don't know much about coding, but I'm having the same issue. What exaclty should I change on my .htaccess file?

  8. remotay
    Member
    Posted 4 years ago #

    Move the part of the code that removes or adds the WWW bit your url to the absolute top of your .htaccess.

  9. Frederick Townes
    Member
    Posted 4 years ago #

    Exactly.

  10. melstan1
    Member
    Posted 4 years ago #

    I had some problems with W3 last week which caused me to have to uninstall it. I worked on it some today and it appears to be fixed, except now it seems that the http:// and the www. versions of my website are running parellel instead of redirecting,

    I don't have an .htaccess file anywhere in my directory. I have no idea how to create one, or what the code would be.

    I assume this problem fits into this thread. Any idea how to fix?

  11. melstan1
    Member
    Posted 4 years ago #

    oh nvm, just called my host and they fixed it for me. Perfect!

  12. Frederick Townes
    Member
    Posted 4 years ago #

    Please post how they resolved your issue.

  13. melstan1
    Member
    Posted 4 years ago #

    I don't know how they resolved the issue. I'm hosted on BlueHost. I contacted Live Chat support and told them that the 301 redirect wasn't working, and also that I attempted to fix it myself using the 301 redirect tool in CPanel with no success. The operator said to give him a few minutes. When he came back he said to clear the cache and cookies and it should work. And it did.

  14. Frederick Townes
    Member
    Posted 4 years ago #

    I see.

  15. Kristina
    Member
    Posted 3 years ago #

    I have to say this is the ONLY thing that worked for me. I was having the same issue (primarily when using Chrome) and it was only after searching once more for a solution after having tried everything else, that this worked for me. Thanks so much for posting the issue and the solution!

  16. Frederick Townes
    Member
    Posted 3 years ago #

    Glad to hear it!

  17. dangayle
    Member
    Posted 3 years ago #

    I had the same problem, but my www redirect was at the top of the .htaccess file.

    The issue was the # RewriteCond %{REQUEST_URI} \/$ directive. Once I commented that out, it worked perfectly. Is there a specific reason for that directive?

  18. Frederick Townes
    Member
    Posted 3 years ago #

    Can you paste all of your rules so I can be sure?

  19. kennethav
    Member
    Posted 3 years ago #

    Just to clarify... W3TC does not do this remapping in its set of default htaccess rules, correct? I believe that SuperCache does, which might lead to confusion for those who are switching.

  20. Frederick Townes
    Member
    Posted 3 years ago #

    Correct.

Topic Closed

This topic has been closed to new replies.

About this Topic