• When trying to go to the Network Admin using the link in the upper right of the admin, the URL is wrong. The link it gives me is:

    http://nottsforestsoccer.comwp-admin/network/

    Should be:

    http://nottsforestsoccer.com/wp-admin/network/

    I can manually add in the missing /, but nothing in the network admin works because it posts new data to the wrong URL – that I can’t manually change.

    My config is

    define('WP_DEBUG', false);
    define('WP_ALLOW_MULTISITE', true);
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'nottsforestsoccer.com' );
    define( 'PATH_CURRENT_SITE', '' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    Not sure if there is a setting off or what.

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

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    What’s yoru .htaccess look like?

    Thread Starter Derek Ashauer

    (@sccr410)

    .htaccess wouldn’t have anything to do with it because it doesn’t get redirected to the wrong URL, it embeds the wrong URL as the link. This means there is an issue with some config option somewhere.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    If all your OTHER internal links work (that is the other /wp-admin/ ones for plugins, posts etc), and you’ve done the ‘disable all plugins’ dance, I still wanna see your .htaccess.

    Cause yeah, however unlikely, it remains a possibility 🙂 And it hurts nothing to share.

    This means there is an issue with some config option somewhere.

    Which woudl be in your htaccess….

    Thread Starter Derek Ashauer

    (@sccr410)

    .htaccess as requested…

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    AddHandler php5-script .php
    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Try this one (very small change to two lines):

    Also it’s better to put AddHandler lines above your rules.

    AddHandler php5-script .php
    
    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # END WordPress
    Thread Starter Derek Ashauer

    (@sccr410)

    Didn’t help anything…

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    When you go to http://nottsforestsoccer.com/wp-admin/ does it force that last / in there?

    Thread Starter Derek Ashauer

    (@sccr410)

    Yes, it redirects me to the URL with the trailing slash.

    This has nothing to do with .htaccess… there is nothing wrong with any redirects. It has to do with the embedded URLs in the admin area. There are no configuration options in the .htaccess file – all that does is handle redirects. Again, nothing is redirecting incorrectly – the admin is simply giving me the wrong URL in the anchor tag.

    I just want to make sure that is the problem here and people aren’t confused.

    When I click on the Network Admin URL, it is trying to link me to http://nottsforestsoccer.comwp-admin/network/ which is missing the slash after the .com. It is not redirecting me to this URL, that is the embedded URL.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    sccr410 – Please try and be calm. If we had a quick answer, you know we’d give it. We don’t, so we’re trying to be logical and reason out what your setup is, and why it’s behaving badly.

    One of the MANY things the .htaccess does is this:

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    AND since the network URL is pulled in from network_admin_url() which just so happens to be a RELATIVE path, grown off of the string for the Admin url link.

    So yours is missing, and we’re trying to sort out exactly WHERE it’s being eaten. Since we are not logged into YOUR site, we have to ask you some weird questions to sort that out.

    Can you put echo get_admin_url(); somewhere on the FRONT end of your site and tell us what the URL is? Also check echo network_admin_url();

    If BOTH of those are fine, you may have a plugin conflict (so turn off ALL plugins, including everything in mu-plugins).

    It is not redirecting me to this URL, that is the embedded URL.

    and this is pulled from blog options and also run thru your rewrite rules (for the blog address) So yes, htaccess.

    Thread Starter Derek Ashauer

    (@sccr410)

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Right then. We’ll have to go for the old standards.

    1) Change your theme to Twenty-Ten (your functions.php may be overriding things)
    2) Turn off ALL plugins, including everything in mu-plugins

    Go check your network settings too. Make sure they are correct (yes, in the admin area).

    Neither Ipstenu & I can reproduce this.

    Thread Starter Derek Ashauer

    (@sccr410)

    Nope, no go. Still get all the wrong URLs with all plugins disabled and Twenty Ten as the theme.

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Wrong network admin URL’ is closed to new replies.