The MU forums have moved to

wacky URL after install (7 posts)

  1. eros
    Posted 18 years ago #

    With a fresh install for directories (not virtual servers), the URL's of the first (all?) blog end up weird.

    The install shows the correct URL of the form:
    (which is the WP root)

    But the email sent has:

    Then, trying to access the blog's URL from the "Well Done!" page, I get a 404 and all links on the page are bad, referencing instead of http://(www.)

    I have a single-user WP on the same server that works fine.

    Can't I have multi-user blogs placed under mu like: (etc.)

    Thanks for any assistance.

  2. zqfm
    Posted 17 years ago #

    i had a similar problem where was changed to edu/blog/iue/.
    the way i fixed it was by editing the functions.php file in wp-includes/.
    above the line

    return apply_filters( 'option' . $setting, maybe_unserialize($value) );

    i added

    if('siteurl' == $setting || 'home' == $setting || 'category_base' == $setting)
    return "http://".$_SERVER['SERVER_NAME']."/blog";

    if this is a horribly terrible thing to do, someone let me know but this was the only thing i could figure out that got it to work.
    as for the blog/foo/ and blog/bar/, i'm still having some trouble with that..

  3. ekusteve
    Posted 17 years ago #

    I had the same problem this weekend when trying to install. I ended up searching the database tables and fixing the urls and it seems to have fixed the problem...still haven't figured out what causes the problem. It's like WP splits the base url during install and instead of getting you end up with http://com/wpmu/domain

    Wierd! I've installed hundreds of individual WP blogs on this server and have never seen this problem.


  4. andrea_r
    Posted 17 years ago #

    I haven't figured it out either. I've tried it myself, and Yes, DrMike, I did type in things correctly. :D There's definitely something somewhere that does this occasionally.

  5. svendster
    Posted 17 years ago #

    I've just installed it and experienced this problem, too. (Note: I'm a newbie.)

    I installed to http://mydomain/blog/ as opposed to root.

    All the links on /wp-admin/index.php (i.e., Dashboard, Site Admin) point to http://com/blog/

    Steve, would you mind listing the main tables that need to tweaked to fix this problem?

    Am I right in assuming that there is not a single place where you can set the [mydomain] value globally?


  6. drmike
    Posted 17 years ago #


    I believe. You may also want to scan through the wp_usermeta and wp_users table as well. wp_1_options also.

    It's globally set within the wp_site table but it gets pulled from there and copied elsewhere.


  7. whocares
    Posted 17 years ago #

    There are two different things mentioned here.

    First, wpmu will strip any leading www from the domain you want to create your blogs on. It will do this (imho kinda stupid thing) regardless whether you want you blogs organized by domain or by directory structure. I agree that this is a difficult topic, but stripping the www no matter what isn't a solution either.

    Next thing to mention is that *IF* you want to use the directory structure, the FIRST blog you create (e.g. the one you create when installing wpmu) has to be named "blog". If you give it any other name, you'll end up with the mangled name structure ekusteve reported.

    In addition, there's an error in the provided .htaccess file that will show when you're using the directory structure method.

    RewriteEngine On
    RewriteBase /aktuell/blog/

    # Rewrite to
    RewriteCond %{HTTP_HOST} ^www\.(.*)
    RewriteRule ^(.*) http://%1/$1 [R,L]

    Actually, this will not only (again and quite unneccessarily when using directories) strip the "www" part from the domain. It will also (for the RewriteBase ist set to some other directory than /) strip the given path as well.

    So either comment out the two last lines of the snippet above if you're using directories (and make sure you've got a "ServerAlias yourdomain.tld" - without the www in your Apache config) or add the missing path from the RewriteBase statement so that the two lines will look like this.

    RewriteCond %{HTTP_HOST} ^www\.(.*)
    RewriteRule ^(.*) http://%1/pathto/blog/$1 [R,L]

    Took me some hours to figure that out.

    Oh, should work for 1.0 and the nightly from yesterday.

About this Topic