WordPress.org

Forums

Redirect mydomain.com to www.mydomain.com in Multisite wordpress (6 posts)

  1. sunilk123
    Member
    Posted 2 years ago #

    I am using a Multisite WordPress installation (Network Installation). We are using Godaddy as host.

    My issue is that I want to redirect mydomain.com to http://www.mydomain.com which is not happenings (In fact reverse is happening)

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    
    # END WordPress

    I am not so good with .htaccess. Please help

  2. My issue is that I want to redirect mydomain.com to http://www.mydomain.com which is not happenings (In fact reverse is happening)

    I strongly urge you not to do this. WordPress Multisite is more persnickity than other installs, and a non-www URL is less likely to have problems.

  3. sunilk123
    Member
    Posted 2 years ago #

    I have just two sites in it (for two languages). I need this as that is the business requirement. Is there an alternative? Or do I need to re-install?

    My network site is in sub folder. For example

    Main site (French): mydomain.com
    English Translation site: mydomain.com/en

  4. You would have to reinstall as http://www.domain.com, but AGAIN, please don't do this.

    If you do, and have problems with redirect loops after upgrading later, I will point back to this and say "I told you not to."

    Don't. It's not supported. Leave off the www, and tell your clients that this is better for Google. If they think WWW is required, then they don't know the difference.

  5. mikeodea
    Member
    Posted 2 years ago #

    Hi
    Can I use a redirection plugin to change domain address from http://www.mydomain.com/wp to http://www.mydomain.com.

    Regards,
    Mike.

  6. No. For Multisite, you would need to treat it as a move (or use .htaccess to redirect).

Topic Closed

This topic has been closed to new replies.

About this Topic