• Resolved rossoonline

    (@rossoonline)


    Hi everyone,

    I’ve read various threads concerning issues with multisite and being redirected but none of them are specific to my case it seems so hopefully someone can nudge me in the right direction.

    As soon as I put:

    define(‘MULTISITE’, false);

    in wp-config.php I can no longer access admin pages on my non-www site as it automatically keeps redirecting me to the login page for the www version of it.

    Now this is why my case is a bit unique. I’m running multisite on a dev copy at the moment where to access it I have an edited hosts file in Windows that has:

    (Ip Address of webhost) domainname.com

    This is so I can access the live version of the site at http://www.domainname.com and then access the dev version at domainname.com to work on.

    Is it possible to get multi-site working while I have a modified hosts file?

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

    (@rossoonline)

    Sorry, I meant I have:

    define(‘MULTISITE’, true);

    Thread Starter rossoonline

    (@rossoonline)

    Bit more info:

    The wordpress install is at domainname.com/blog/ and I’m currently trying to use multisite so that I can use wordpress to manage pages under a “/page/” directory.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    I can no longer access admin pages on my non-www site as it automatically keeps redirecting me to the login page for the www version of it.

    Okay, BEFORE you turn on Multisite, go to /wp-admin/options-general.php

    Make 100% sure that your site is domain.com and NOT www.domain.com

    They should both be the same.

    Thread Starter rossoonline

    (@rossoonline)

    Hi Ipstenu,

    Thanks for your reply. I just double-checked, and both of these fields:

    WordPress Address (URL)
    Site Address (URL)

    Are “http://domainname.com/blog”.

    I even deleted the network tables to start the multi-site from scratch and it still says that address and still redirects me to the www version of any admin pages!?

    I’ll continue looking, the htaccess file doesn’t reveal anything that would be causing it. The top level of the domain doesn’t have an htaccess file and this is where Magento is installed, but I can’t see how that would affect anything.

    Thread Starter rossoonline

    (@rossoonline)

    What’s interesting is, when I go to the admin login for the non-www, as soon as I login, I get redirected to the www version of the admin page. I don’t understand fully how logging into a dev site could allow me access to the live site!? Unless something in the session between the two sites happens to share the same data beyond the username and password.

    Thread Starter rossoonline

    (@rossoonline)

    Hello again,

    I solved it!

    Even though in the WP options screen it said it didn’t have www, i went into the database table wp_options and the siteurl and home fields still had it. So I removed it from there and it worked.

    I don’t get how it didn’t show that in the admin page though.

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

The topic ‘Enabling multisite with edited hosts file’ is closed to new replies.