remotay
Member
Posted 2 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/
Responded to your bug submission. This issue is related to the order of directives in your .htaccess file.
remotay
Member
Posted 2 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).
MrGroove
Member
Posted 2 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.
centepines
Member
Posted 2 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?
remotay
Member
Posted 2 years ago #
Move the part of the code that removes or adds the WWW bit your url to the absolute top of your .htaccess.
melstan1
Member
Posted 2 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?
melstan1
Member
Posted 2 years ago #
oh nvm, just called my host and they fixed it for me. Perfect!
Please post how they resolved your issue.
melstan1
Member
Posted 2 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.
Kristina
Member
Posted 2 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!
dangayle
Member
Posted 2 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?
Can you paste all of your rules so I can be sure?
kennethav
Member
Posted 2 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.