• Resolved elijahn

    (@elijahn)


    I’ve been experimenting with wordpress’s multisite functionality and it seems like anytime multisite is installed it forces wordpress to use 302 redirects on the main domain instead of 301.

    For instance prior to activating multisite on a new blog http://example.com does a 301 redirect to http://www.example.com (the way I want)

    Immediately after installing multisite the site starts using a 302 redirect to go from http://example.com to http://www.example.com

    All my attempts in .htaccess to force a 301 instead of the 302 don’t seem to have any effect.

    Is there anyway to force a wordpress multisite installation to use a 301 redirect?

    Thanks,
    Elijah

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Was your site, BEFORE you activated MultiSite, setup as example.com or http://www.example.com?

    That is, if you’re on single site, are your WordPress address (URL) and Site address (URL) set to http://domain.com ?

    Thread Starter elijahn

    (@elijahn)

    Thanks for the reply. I did double check the settings prior to activating Multisite and both the WordPress address (URL) and Site address (URL) were set to http://www.example.com

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Okay. In yuor wp-config.php file, there’s a line

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

    Is it set to that?

    Thread Starter elijahn

    (@elijahn)

    Yes, it’s set to ‘www.domain.com’

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Did you put your .htaccess redirect code ABOVE the wordpress code?

    Thread Starter elijahn

    (@elijahn)

    That was my problem. After moving the redirect code above the multisite code in .htaccess the 302 switched back to a 301. Thanks so much for your help! 🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Multisite installation forces 302 redirect?’ is closed to new replies.