• kcomphlint

    (@kcomphlint)


    I have a multisite install running 3 sites. It seems that anytime you to domain.com/site1/ or domain.com/site1/page1, it automatically redirects to https://www.domain.com

    I am not sure if this is a DNS issue or just the way the MultiSite was configured or what. I have verified that the htaccess file is still just the basic htaccess.

    Also, the “domain” under Network Admin > Site is set to have the www in it.

    Also, this is in the wp-config file:

    define( 'DOMAIN_CURRENT_SITE', 'www.thesummitonline.com' );

    Here is an example: https://thesummitonline.com/birmingham (will redirect back to https://www.thesummitonline.com)

    Any ideas?

Viewing 6 replies - 1 through 6 (of 6 total)
  • I am having the same problem, when I put in bathplanet.com/reno it redirects me to bathplanet.com. I can go to bathplanet.com/reno after the main site loads, but it always redirects on the first attempt. Sucks if they are running an ad or something for that URL. I’ve looked and haven’t found anything yet. ??

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I have verified that the htaccess file is still just the basic htaccess.

    The basic MULTISITE htaccess ?

    This is what I have, what WP told me to place in the htaccess, the one from Network Admin–>Settings–>Network Setup. I just noticed also that this happens when trying for wp-amin, basically anything on the first attempt.

    # 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
    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    abesanchez – Make your own post please so we can help the OP ?? It’s really hard to help multiple people with server problems in one thread, since you lose track of what’s going on where.

    Thread Starter kcomphlint

    (@kcomphlint)

    Ipstenu – yes, the standard multisite htaccess.

    I think the issue is that if you put the https://www.domain.com in as the site/network URL, you ALWAYS have to use the www, but if you just put in domain.com, then you can use either.

    Is that correct?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    That is correct on most servers (some are smarter than others, I’ve not yet sorted out why).

    Try putting this in your .htaccess, above the WordPress lines:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^www.your_domain.com$
    RewriteRule ^(.*)$ https://www.your_domain.com/$1 [R=301]
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘All non-www URLs redirect to www URL’ is closed to new replies.