Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter yayitswei

    (@yayitswei)

    By the way, I looked at this previous thread, which got me started by suggesting I change the domain name in the mapping plugin to include the www.

    As far as I know, it doesn’t solve my problem which is that non-www urls aren’t redirecting correctly to their www versions.

    You should put those code in your .htaccess

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

    Remember:

      replace “yourdomain.com” with your own domain
      put it right after the `RewriteEngine On
      RewriteBase /
      RewriteRule ^index\.php$ – [L]`

    After that, you can check it at
    http://www.stepforth.com/resources/server-header-checker-tool

    If your http://toptenmba.org return is 301 redirect so that is done well.

    Be careful as tweak the .htaccess file can cause some serious trouble with your MU setting. If you need further information, contact me at my blog : http://nguyenkhanhlam.com

    Thread Starter yayitswei

    (@yayitswei)

    Thanks for your reply! I’m using multisite (I have about 10 possibilities for yourdomain.com), so the solution I ended up going with was to add both mydomain.com and http://www.mydomain.com into the MU Domain name plugin, and mark the www version as primary.

    My httaccess file looks like that

    # BEGIN WordPress
    <IfModule mod_rewrite.c>

    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    if I add

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} .
    RewriteCond %{HTTP_HOST} !^example\.com
    RewriteRule (.*) http://example.com/$1 [R=301,L]

    it will crash the site and a message comes up saying that the page isn’t redirecting properly…what have I’ve done wrong?

    Sorry,

    I don’t know what you mean by “add”. I you remain you .htaccess the same (without any removal), I think it would have trouble. Or, If you mean by replace by the new one, tell me?

    thanks i have solved same problem which is with my site now its work good.

    http://www.vfundude.com/

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘non-www to www 301-redirect for multisite?’ is closed to new replies.