WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Old site when you add 'www' (why is it even there)? (4 posts)

  1. ROBIN HQ
    Member
    Posted 9 months ago #

    Hi all,

    In our WordPress MultiSite Network Admin > Site settings, we have every site url defined without 'www'. If you browse to http://www.robinhq.com/blog, you will be redirected to http://robinhq.com/blog.

    The strange thing is, if you browse to http://www.robinhq.com, you stay there, and see and old version of the site (compare it to http://robinhq.com, check the menu).

    We already emptied al caching (we use W3 cache), this didn't solve the problem. Any idea why this is happening, and how to fix this?

    Thanks!

  2. First of all, may I say I LOVE the picture of the guy in the Robin togs?

    Both versions point to the same IP, that's good.

    It's probably somethign on your server setup. You're using Amazon, so it could be a cache issue. I would toss this in the top of my .htaccess to force no-www

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !^domain.com$ [NC]
    RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301]
  3. ROBIN HQ
    Member
    Posted 9 months ago #

    Ha, thanks! That's the ROBIN team! :)

    Problem is solved, thanks a lot! Also had to place this rewrite above all W3 cache rewrites. Hope this does not affect how the W3 caching plugin works?

    Thanks!

  4. It won't :) The magic to .htaccess is that the stuff on top happens first, so you'll be forcing no-www and THEN caching.

Reply

You must log in to post.

About this Topic