The MU forums have moved to WordPress.org

Rewrite rules - Am I shooting myself in the foot? (7 posts)

  1. jaredbangs
    Member
    Posted 15 years ago #

    I recently had the need to migrate a standard WP 2.2 blog into WPMU, with the requirement for the "root" blog to contain the content from the original standard blog.

    This worked just fine using the import/export features of both, exporting from 2.2 and importing into the main blog. The only catch was that MU adds the /blog/... to the permalink structure of the main blog, and the old permalinks (just date based: "/2007/..."), so old references would not work in the new installation.

    I managed to add a rewrite rule that would support either format and direct it to the right place, so that /blog/2007/... AND /2007/... both go to the same target, and it seems to be working fine. I can post the code I used (in the form of a plugin) if anyone's interested.

    My question, for those more experienced in MU than I, is whether this will cause any problems I haven't uncovered yet. Like I said, so far, so good, but I just wanted to run it by some people with more experience to see if I'm missing anything that will come back to bite me later.

  2. lunabyte
    Member
    Posted 15 years ago #

    Are you using subdirectories, or subdomains for other blogs?

    If it's subdomains, there isn't an issue that I've found yet, and it's pretty easy to just strip it out without the need for a rewrite.

    If it's subdirectories, then yes, it will end up causing issues, which is why the /blog/ is there in the first place.

  3. jaredbangs
    Member
    Posted 15 years ago #

    Strictly subdomains, so I think I'm OK there.

    I'd prefer to do it without altering the core files, so rewrite rules are the only way I know of doing that, but if you can think of something else, I'd consider it as well.

  4. lunabyte
    Member
    Posted 15 years ago #

    No, you would have to edit one of the admin core files because it's hardcoded into the options -> permalink page.

    Me personally, I'd rather edit a core file than take the performance hit of yet another rewrite by apache.

  5. jaredbangs
    Member
    Posted 15 years ago #

    Well, I'm only modifying the internal rewrite rules that are already there (the ones that handle /blog/), so as far as I understand there's no additional performance penalty with that approach.

    Maybe I'm mistaken in that assumption, but it's already loading those, so loading alternate ones shouldn't be a problem, I wouldn't think.

  6. ladynada
    Member
    Posted 15 years ago #

    can anyone explain how to fix the problem with this appending of the /blog/ to the home blog and causing the links to be wrong for tag archives?

    for example the url for the tag love is

    http://motheronearth.com/members/tag/love

    and that sends you to the

    http://motheronearth.com/members/wp-signup.php?new=tag

    thanks for any help,
    nada

  7. ladynada
    Member
    Posted 15 years ago #

About this Topic

  • Started 15 years ago by jaredbangs
  • Latest reply from ladynada