• Resolved CSD_Images

    (@csd_images)


    I’ve set up a multi-site WP installation. Everything is fine but when you remove the www from the domain name it redirects to a registration page. Is there a way of stopping this as I have registrations disabled.

    Sub-domains work fine, it’s just the primary URL I want to sort as people do type in addresses sans www these days.

    Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter CSD_Images

    (@csd_images)

    OK after searching various posts the recommendation is to use the domain mapping plug-in.

    So a couple of further questions:

    Does WP over-ride the .htaccess in regards to domain names? I’ve got a redirect there which was working fine until the transition.

    Why does WPMS point to a registration page when you omit the www?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    That’s one option.

    The other is this for your .htaccess, at the top, ABOVE your WordPress calls.

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

    Thread Starter CSD_Images

    (@csd_images)

    Those rules unfortunately put the site into a redirect loop! Thanks though…

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    That’s … odd. I have it in mine. It SHOULD only redirect if you’re coming in from http://www.domain.com

    When you setup your site, did you do it as domain.com or http://www.domain.com?

    Thread Starter CSD_Images

    (@csd_images)

    It’s set up for www.

    OK removing all rules bar cache/WP this is what happens currently:

    • www directs to main site – which is what I want
    • no www redirects to sign up page (why:) and I want it redirect to main site.
    • I also don’t want it to affect sub-domains such name1.mainsite, name2.mainsite etc.

    Whilst I could get the redirect to work I couldn’t stop it affecting the sub-domains.

    Thread Starter CSD_Images

    (@csd_images)

    Solved it:

    # Redirect adding leading www to root domain if no subdomain is specified
    RewriteCond %{HTTP_HOST} ^domain\.com$
    RewriteRule ^/?$ “http\:\/\/www\.domain\.com” [R=301,L]

    This leaves the sub-domains alone but redirects no-www to www.

    Now for the other headaches!

    Thanks for the help Ipstenu.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Oh hah, had it backwards. Sorry! I mis-read it somehow!

    Thread Starter CSD_Images

    (@csd_images)

    I’ve finally tracked down the why of the behaviour by pure chance. This is purely FYI in addition to the above.

    http://frumph.net/wordpress/wordpress-3-0-multisite-subdomain-installation-noblogredirect-behavior-fix/

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

The topic ‘Remove redirect to registration page.’ is closed to new replies.