Support » Networking WordPress » multisite subdirectory blogs missing slash

  • Resolved clevelandstate


    New WordPress 3.5.2 multisite (subdirectory) install is missing a slash when creating new blogs.

    WordPress is installed to server like:
    When a new user registers, the conformation email has the URL for their blog like: http://blogs.domain.comnewuser (missing the / between the domain and blog name).

    From Network Admin, I can edit the site, adding a / to either the end of the Domain field or the begining of the Path field and the site can be accessed:

    I’m guessing there is something missing or incorrect in my wp-config.php file. Any ideas on what could fix this?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Paul Barthmaier


    Contributor Day Volunteer

    Hi there,

    Actually, I think there is something missing from your htaccess, rather than wp-config. Here’s what mine looks like:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    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

    You’ll notice the second line and the bit in the middle.

    Thanks Pali, but my .htaccess file is the same.

    I think it might be a config issue since the new account email is sent with the wrong URL. Correct me if I’m wrong, but doesn’t .htaccess only come into play when someone is visiting the site?

    Below is the multisite section of my wp-config, but it’s copied from the setup just like the .htaccess

    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', '');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    That would be a correct wp-config.

    You can TRY putting in $base = '/'; but it shouldn;t matter.

    In wp_site AND wp_blogs, what’s the domain and path set to for your site?

    Adding $base = ‘/’; to wp-config didn’t seem to make a difference.

    wp_site has:
    path: /

    wp_blogs has:
    path: /

    but when a new user/blog is added, wp_blogs gets:
    path: user/

    Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    That’s … weird. It should be /user/

    What plugins are you running?

    • WPMU Ldap Authentication
    • Social Sharing Toolkit
    Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    WPMU Ldap Authentication … What happens if you turn that off and make a site?

    So, WPMU Ldap Auth. plugin was the culprit.

    Disabling the plugin allowed new users/sites to be created correctly.

    I found this site that has a fix for the issue:



    I found the solution for this.
    Edit the following file: wpmuldap/lib/wpmu_ldap.functions.php

    $domain = strtolower( wp_specialchars( $newUserName ) );
    	if( constant( "VHOST" ) == 'yes' ) {
    		$newdomain = $domain . "." . $current_site->domain;
    		$path = '/' . $base;
    	else {
    		$newdomain = $current_site->domain;
    		$path = '/' . $base . $domain . '/';

    Notice that I added “‘/’ . ” for every $path definition. That should do it. Now blogs will be created fine as new users log in.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘multisite subdirectory blogs missing slash’ is closed to new replies.