• Question: when in multisite admin, if one enters a site name for a site that does not exist, wp-admin defaults to the root admin page. Example: site in network is siteaddr.com/boo/; if I enter siteaddr.com/boofoo/wp-admin, (and that site is not in the network) the admin page is siteaddr.com/, but the url stays at siteaddr.com/boofoo/wp-admin. I have a number of users that consider this a bug, (it seems that it should return a 404) and I cannot seem to find any relevant information about it. Any ideas? Thanks!

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

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    You can redirect it.

    define( 'NOBLOGREDIRECT', 'http://somedomain.com/somepage' );

    Thread Starter milleronic

    (@milleronic)

    Isn’t that essentially what is being done now? Also, that results in a redirect loop.

    [Moderator Note: No bumping, thank you.]

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    The define is letting you force where people go if there’s no blog.

    Example? Go to foobar.ipstenu.org – it takes you INSTEAD to ipstenu.org/about

    I did it by defining this:

    define( 'NOBLOGREDIRECT', 'http://ipstenu.org/about/' );

    Thread Starter milleronic

    (@milleronic)

    Didn’t mean to ‘bump’… (I’m not even sure how to do that, and if I’ve done it inadvertently please forgive me…)

    I understand what the define does, I’m talking about the admin area. The define does not do what I wish in the admin area. A registered user (logged in) tries to go to sitename.com/foo/wp-admin, but types in sitename.com/boo/wp-admin ( site /boo/ does not exist ) – they end up at sitename.com/wp-admin, but the url displays what they typed in – no error or message. My users feel (and I agree with them), that wp-admin should throw some sort of error message, and not just fall back to the root site without so much as a ‘howdy’. Thanks for your assistance thus far!

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Posting multiple times without adding any content of value is bumping. 🙂

    The define does not do what I wish in the admin area.

    That’s weird… it’s working for me on WP 3.7

    Go to kjhdfadsfads.ipstenu.org/wp-admin

    Thread Starter milleronic

    (@milleronic)

    Sorry, but your example is completely different to the issue I am experiencing. I’m not talking about subdomains and not logged-in users.

    If a logged-in user enters an invalid url in the admin area, the site redirects to the root-level admin area, while the site url reflects the non-existent url. Would screenshots be helpful? I’m behind a firewall, so cannot provide you with a link. Thanks again for trying, it is much appreciated…

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    I’m not talking about subdomains and not logged-in users.

    I’m 99.99999% sure you’re not logged in to my domain 😉

    Also as a logged in user, if I visit kjhdfadsfads.ipstenu.org/wp-admin it kicks me to ipstenu.org/about

    The only difference now is subdomains, which … is possibly the issue. Though I’d be surprised.

    Thread Starter milleronic

    (@milleronic)

    Also as a logged in user, if I visit kjhdfadsfads.ipstenu.org/wp-admin it kicks me to ipstenu.org/about

    That is not what I want it to do! (If a user is logged in and in the admin area, don’t you think they want to be there? ) If I am at kjhdfadsfads.ipstenu.org/wp-admin (and logged in === true), then it should throw an error message up (that site does not exist) and/or redirect me to the sites page,(/wp-admin/network/sites.php). Does this make sense?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    If I am at kjhdfadsfads.ipstenu.org/wp-admin (and logged in === true), then it should throw an error message up (that site does not exist) and/or redirect me to the sites page,(/wp-admin/network/sites.php).

    Well mine goes to /about/ because I told it to.

    If I wanted it to redirect based on logged in/out, I’d wrap a check in my config.

    if ( is_user_logged_in() ) {
        define( 'NOBLOGREDIRECT', 'http://ipstenu.org/wp-admin/network/sites.php' );
    } else {
        define( 'NOBLOGREDIRECT', 'http://ipstenu.org/about/' );
    }

    It probably should kick out an error, though, you’re right with that. I suspect this is a hold-over from when Multisite was all managed from the main domain. I made a trac ticket – http://core.trac.wordpress.org/ticket/25802 – but I don’t know how fast that’ll be picked up :/ I’m not sure where to look in the code.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘wp-admin urls’ is closed to new replies.