WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] multisite subdirectory blogs missing slash (9 posts)

  1. clevelandstate
    Member
    Posted 11 months ago #

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

    WordPress is installed to server like: http://blogs.domain.com
    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: http://blogs.domain.com/newuser

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

  2. Paul Barthmaier
    Contributor Day Volunteer
    Posted 11 months ago #

    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]
    </IfModule>
    # END WordPress

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

  3. clevelandstate
    Member
    Posted 11 months ago #

    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', 'blogs.domain.com');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
  4. 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?

  5. clevelandstate
    Member
    Posted 11 months ago #

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

    wp_site has:
    domain: blogs.domain.com
    path: /

    wp_blogs has:
    domain: blogs.domain.com
    path: /

    but when a new user/blog is added, wp_blogs gets:
    domain: blogs.domain.com
    path: user/

  6. That's ... weird. It should be /user/

    What plugins are you running?

  7. clevelandstate
    Member
    Posted 11 months ago #

    • WPMU Ldap Authentication
    • Social Sharing Toolkit
  8. WPMU Ldap Authentication ... What happens if you turn that off and make a site?

  9. clevelandstate
    Member
    Posted 11 months ago #

    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:
    http://www.fotan.net/wpmu-ldap-plugin-fixes/

Reply

You must log in to post.

About this Topic