• Resolved jeygifford

    (@jeygifford)


    Hi team. I’m having problem with my WordPress Multisite setup (www.sjag.org). On the admin dashboard, all of the URL links under MY SITES > NETWORK ADMIN get rewritten without a trailing slash on the domain name. So, for example, sjag.orgwp-admin/network (note the lack of a slash between .org and wp-admin).

    If I add a trailing slash to the DOMAIN_CURRENT_SITE url in the wp-config.php (sjag.org/), the address gets rewritten correctly, but then the page comes back with an ERR TOO MANY REDIRECTS.

    If I add a slash under PATH_CURRENT_SITE', '' to read PATH_CURRENT_SITE', '/' I get a division by zero error.

    All of the other links work perfectly on the admin dashboard as well as the front end. It’s just the NETWORK ADMIN and its submenus.

    This site was originally developed on MAMP localhost and then migrated using WP MIGRATE DB plugin. This error does not exist on the MAMP version.

    /** MySQL hostname */
    define('DB_HOST', 'localhost');
    
    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8mb4');
    
    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');
    
    /**
     * For developers: WordPress debugging mode.
     *
     * Change this to true to enable the display of notices during development.
     * It is strongly recommended that plugin and theme developers use WP_DEBUG
     * in their development environments.
     *
     * For information on other constants that can be used for debugging,
     * visit the Codex.
     *
     * @link https://codex.wordpress.org/Debugging_in_WordPress
     */
    define('WP_DEBUG', false);
    
    /* Multisite */
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', 'sjag.org');
    define('PATH_CURRENT_SITE', '');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    define('WP_HOME','sjag.org');
    define('WP_SITEURL','sjag.org');

    ********

    HTACCESS File is

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [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]
    
    # END WordPress

    *********
    Thanks for any help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • I have mine defined:
    define( ‘PATH_CURRENT_SITE’, ‘/’ );

    Thread Starter jeygifford

    (@jeygifford)

    I guess the bigger question may be whether or not define( 'PATH_CURRENT_SITE', '/' ); (with the /) is the correct syntax and the TOO MANY REDIRECTS error is the actual problem.

    jeygifford –
    It shouldnt be a question of which setting to use. You should use the setting reported by WP console -> Network Admin -> Settings -> Network Setup

    That tells me exactly what to put into wp-config.php and .htaccess

    Thread Starter jeygifford

    (@jeygifford)

    jkhongusc
    Do you mean WP Console, the plugin?

    Thread Starter jeygifford

    (@jeygifford)

    Hi All. Believe it or not, this is an ongoing problem. I’ve just been working around it, but I’m at the point where I need to get to the Network Admin page. Anyone else have some wisdom here?

    Thread Starter jeygifford

    (@jeygifford)

    OK. I got it figured out. It turns out that an errant apostrophe mismatch was messing with wordpress.

    This character (‘) was being replaced with this character (`) in my text editor. So a search and replace yielded two results which were replaced with proper characters and now all is well.

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

The topic ‘Network Admin Links re-written without Proper Slash’ is closed to new replies.