• Still battling this one and still seeing posts by others that aren’t finding answers either. :\

    The sites I make using Multisite come out with this URL structure: https://www.mymythos.orgmymythos_orgsidian/

    Everyone (DreamHost staff and WP Forum Mods) seems to say that it must be something to do with the htaccess and something called the custom mod_rewrite. But alas, I’m not much of a coder and my research isn’t yielding much useful info for me.

    But here is my htaccess at the moment:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    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).*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    </IfModule>
    
    # END WordPress

    I was told before that this block of code looks fine, but I thought I’d post again for others to take a double look.

    Hopefully if we can make a breakthrough with one case of this, then the group of others experiencing it should be able to use this knowledge as well.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter SidianMSJones

    (@sidianmsjones)

    Also if it helps, I customized my permalinks by adding: /%category%/%postname%/

    Thread Starter SidianMSJones

    (@sidianmsjones)

    Oh yes, and before I forget! I also got the “existing wordpress network” warning at one point but haven’t seen it since. ??

    Thread Starter SidianMSJones

    (@sidianmsjones)

    Checking out the items in PhpMyAdmin seems to have just revealed that I have duplicates of a bunch of things, or maybe I’m reading this wrong, but there are a lot of entries that look like this:

    wp_4kegu2_comments
    wp_4kegu2_comments (1)

    Could this be the root of the issue?

    YES! ??

    thought I was going insane…

    The database name in the URL is the same as I decribed here:

    https://www.ads-software.com/support/topic/419042

    The mymythos_orgsidian-part of your URL is the database name. It’s supposed to be a slash, but the wp-config.php has a line at the end of the file that sets the variable $base to DB_NAME, thus causing new sites to be given a wrong base path. Result: Weird URLs

    (I also have Dreamhost PS, btw)

    uh, yeah. Those variables defined in your config files aren’t in any of my installs.

    Either fantastico or Dreamhost is adding those lines. See original code here:

    https://core.trac.www.ads-software.com/browser/trunk/wp-config-sample.php

    Thread Starter SidianMSJones

    (@sidianmsjones)

    So would I just go through and delete each of those duplicate items? Or is there a more thorough/precise way to do this?

    I thought I was going crazy but I have the same exact issue and I’m also on a Dreamhost PS.

    Here’s the reply that I got back from support about how he fixed it the first time (the first sub-domain I created):

    That url is an issue internal to wordpress configuration. Ive corrected it for you. If this issue pops up with each new blog you create you may need to check and see what in wordpress` settings may be adding that additional text to the urls.

    When I asked specifically what the issue was so I could correct it myself I received this reply:

    1. Visit your phpMyAdmin (you can get your login details by peeking at
    your wp-config.php)

    2. Click into the database that is running your MU installation.

    3. Once you are switched to the database, click the link for the
    wp_options_2 table (it may have a slightly different name in each DB
    like: wp_iqc0rp_options_2)

    4. Once the page loads on the right hit the “browse” button, and look
    through the entries. There will be a blogurl entry and a home_page entry
    that will both have the incorrect URL in it.

    5. Hit the “pencil” icon to allow you to edit the field that pops up.

    6. Correct the URL and hit “save”, then repeat the process with the other
    messed up url.

    …which is fine if I want to fix it for each sub-domain (because the issue is recreated with every new sub-domain for me) but it’s not a terribly efficient way of dealing with it longterm.

    So ANY help to isolate this issue and pass the info back to Dreamhost for future support issues would be hugely appreciated because it’s terribly frustrating. Any way to do this more easily than a manual edit?

    Thread Starter SidianMSJones

    (@sidianmsjones)

    Huh, so that fix only works on a manual per-site basis? That would be extremely inefficient for me.

    I have already contacted Dreamhost as noted in other threads.

    It’s from extra code added by Dreamhost to the wp-config.php file via their One-Click installer.

    To *really* fix it, go edit your config file and take out the $base line at the bottom. This will not only fix the issue but prevent it from being added to new blogs as well.

    See thread here:
    https://discussion.dreamhost.com/thread-126948-post-128112.html#pid128112

    Also, a fresh manual install (not a one-click) will also fix it.

    Thanks Andrea, I got the same response this morning. It appears they are working on a fix on their end.

    The holiday weekend slowed ’em down.

    I’ve solve this error
    just remove this lines

    $server = DB_HOST;
    $loginsql = DB_USER;
    $passsql = DB_PASSWORD;
    $base = DB_NAME;

    which was generated by DH

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘htaccess, custom mod_rewrite, and weird URL construction issue’ is closed to new replies.