Support » Networking WordPress » Multisite wrong URLs for the new blogs

  • Resolved Donald McIntyre

    (@donmcint)


    Hello!

    I installed WP 3.1 and enabled it for multisite. I chose sub-directory and not sub-domain. The problem is that when a member creates a new blog it creates it with a wrong URL address all together: it does it with this format:

    http://example.comexample_comnewblog

    when it should be:

    http://example.com/newblog/

    example_com is the name of the database! In network admin >> settings >> network setup it teels me to add:

    wp-config

    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = 'eebees_com'; <--- THIS IS WRONG SHOULD BE /
    define( 'DOMAIN_CURRENT_SITE', 'eebees.com' );
    define( 'PATH_CURRENT_SITE', 'eebees_com' ); <--- THIS IS WRONG SHOULD BE /
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    .htaccess

    RewriteEngine On
    RewriteBase eebees_com <--- THIS ALSO WRONG SHOULD BE /
    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]

    SUMMARY: I donĀ“t know why wordpress is taking this info, I even put it write in wp-config and .htaccess and it still picks up eebees_com instead of /.

    Can you help me please?

    Thank you!

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

    (@ipstenu)

    Lead Plugin Wrangler

    When you change it to this:

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

    The URL remains broken, right?

    Can you check your WHOLE wp-config.php and make sure there isn’t a SECOND $base call in there?

    I fixed it!! lol.

    I spent 5 days with this problem!!

    how?

    I changed the text below /* stop editing! */ to what the wp-config-sample.php text had!! which is:

    /* That’s all, stop editing! Happy blogging. */

    /** Absolute path to the WordPress directory. */
    if ( !defined(‘ABSPATH’) )
    define(‘ABSPATH’, dirname(__FILE__) . ‘/’);

    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . ‘wp-settings.php’);

    Thanks anyway and I hope this topic helps future users if they get the same problem!

    Thank you Ipstenu! that was it! Your message was posted while I was writing my solution!! And your solution was the right one there was another $base below the /* stop editing */ line!

    Thank You again!

    Donald.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    Yeah, some hosts get really … helpful that way. Glad it worked!

    I’m having a similar problem (after enabling Network setting on my WordPress 3.x Ubuntu-based server)… with missing slashes in the URLs for newly defined sites i.e., a new site “test” is defined as http://mydomain.comwordpresstest.

    I can edit the url to insert the slash(es), http://mydomain.com/wordpress/test, and all is well.

    the config files and rewrite look correct so I’m not sure what to check next.

    Help!?

    pbaker99 in the config.php file at the end it sais something like, stop editing…

    Replace that last few lines with this and it fixes it:

    /* That’s all, stop editing! Happy blogging. */

    /** Absolute path to the WordPress directory. */
    if ( !defined(‘ABSPATH’) )
    define(‘ABSPATH’, dirname(__FILE__) . ‘/’);

    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . ‘wp-settings.php’);

    The default final text on WP 3.1 config.php file is wrong!!

    I am running on Ubuntu which I think uses a different config file… so I’m not sure what to change or where.

    [Code moderated as per the Forum Rules. Please use the pastebin]

    I found the problem. $base was defined a second time in the “$debian_file” (require_once($debian_file);)

    Here’s the offending section (snippet)…

    $table_prefix  = 'wp_';
    $server = DB_HOST;
    $loginsql = DB_USER;
    $passsql = DB_PASSWORD;
    ## $base = DB_NAME;  <-- commented this out... which fixed the URL problem
    $upload_path = "/var/www/wp-uploads/localhost";
    $upload_url_path = "http://localhost/wp-uploads";

    Thanks for your help!

    Andrea Rennick

    (@andrea_r)

    Customer Care at Copyblogger Media and Studiopress

    Yep, Dreamhost does the same thing. That must be specific to the installer you used, as that line is not in the core files.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Multisite wrong URLs for the new blogs’ is closed to new replies.