The MU forums have moved to WordPress.org

Integrating WPMU into an existing site - htaccess questions (2 posts)

  1. xyzzy
    Member
    Posted 19 years ago #

    Hi, I'd like to integrate wpmu into my existing web site. I'll be using wpmu as a cms-engine, mostly, and will eventually migrate existing subsites over to wpmu.

    That is, I already have a structure like this:

    domain.com/area1
    domain.com/area2

    I would like to add wpmu to the site so I can host new subsites (er, blogs), like this:

    domain.com/newarea3
    domain.com/newarea4

    For 404 errors, I would like to load my existing 404 page. Plus I do not want visitors to my site to EVER see wp-signup.php?new= if they try to go to a url that does not currently exist.

    So... my thought is that I can just edit the htaccess file at the root of the server. I don't have a problem listing all of my wpmu sites/blogs in there, like this:

    RewriteRule ^/newarea4(/)? index.php [L]

    The problem is that this doesn't work. Does anyone have any advice or a working htaccess file for this kind of problem? thanks.

  2. xyzzy
    Member
    Posted 19 years ago #

    Hmmm, this seems to work:


    RewriteEngine On
    RewriteBase /

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]

    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]

    RewriteCond %{REQUEST_URI} /newarea3(/)?(.*)
    RewriteRule . index.php [L]

About this Topic