The MU forums have moved to WordPress.org

Login problems (5 posts)

  1. EnderatEros
    Member
    Posted 16 years ago #

    Hello,
    I've read http://mu.wordpress.org/forums/topic.php?id=4242&replies=7

    I have wordpress-mu-1.2.3-2.2.1 installed on my server, php5 and apache2, mysql5. I'm on mac os x, and i use safari 3 beta and firefox 2.0.0.4

    I wanted to install it at the root domain, example.com, but I wanted to use http://www.example.com because it looks nicer, and that's how all my business cards are printed (so, when someone goes to the www. version they get redirected to example.com). Since wordpress-mu doesn't support this, the login didn't work (because of the cookies).

    I had no problem with installing the mu in a different domain, and then making a blog in the http://www.example.com domain, so that's what i did. I installed the mu at wp.example.com, and I could login to the wp.example.com domain and administer everything fine. I created a new blog, and changed all the URL and domain settings to example.com (instead of name.wp.example.com). And I also added another domain, example2.com
    All of the extra domains have non-www. visitors redirected to the www. version of the domain.

    I guess that is where the cookie problem comes in. When I login to the wp.amarimono.com backend and click on the backend for the respective sites, it brings me to a login page. When I login, it just redirects me back to the login page.

    I'm assuming that mu tries to make a example.com cookie, but since I'm viewing it at www. it doesn't work? (I'm also assuming the same for example2.com).

    If so, is there a way to change mu so it makes a www. cookie instead? Or is this a different problem?
    Thanks,
    Takumi

  2. drmiketemp
    Member
    Posted 16 years ago #

    Simple answer is no, at least without rewriting a lot of code. You would have login issues as well with your user's blogs if you were to force it. Forcing the 'www' bit is also incorrect as it's not part of the domain name, it's a machine name off of the domain name.

    I could go on in detail but I've only got a couple of hours today and a lot more to do.

  3. lunabyte
    Member
    Posted 16 years ago #

    The overall problem is that MU relies on subdomains to operate. So if you have domain.com, and use subdomains from that, www is a subdomain. When in subdomain mode, that's how it knows initially what site to present to the user. It looks for what is in front of the domain it is working with. So it would see www as a subdomain of domain.com and try to process it.

    Now, this could be worked around in the core, however it would actually require more processing than it is worth and a simple rewrite rule to redirect to the non-subdomain version is more efficient.

    Addressing your site as www whatever is fine, and users are silently redirected to the non-www version, which is technically correct.

  4. drmiketemp
    Member
    Posted 16 years ago #

    Sounds right. The site should be responsive with both with and without the prefix as well.

  5. EnderatEros
    Member
    Posted 16 years ago #

    Thanks for the help so far :)

    I know MU relies on subdomains to operate, but subdomains are basically the same thing as domains, right?

    I agree that it should be responsive with both with and without the prefix, but for some reason it's not. And that's why I mentioned the other thread because they were having the same problem too (but I followed the steps and it didn't work)

    What part of the code would I need to change?
    Thanks,
    Takumi

About this Topic

  • Started 16 years ago by EnderatEros
  • Latest reply from EnderatEros