Support » Networking WordPress » Multisite with one Mapped Domain htaccess problems

  • Hi I’ve got a bit of a problem as I can’t seem to get this working..

    This does not work for the map domain – it causes a 500 error:

    RewriteEngine On
    RewriteBase /main/
    RewriteRule ^index\.php$ - [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]

    .. But all the other subsites work.

    If I use the following htaccess:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [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]

    It will cause the mapped domain to function properly but all the rest of the subsites, including the parent site will throw Error 404s.

    Interestingly, I turned off pretty permalinks for the mapped domain and used the default WP htaccess code above, and it worked – not the ideal situation.

    My guess is that it’s a permalink issue? I’ve done all the steps to refresh/reset the permalinks. I’ve deactivated all the plugins and tried again without success.

    Currently the entire network is installed in a subdirectory. Will this cause issues?

    Do I need additional htaccess codes in there?

    Something that may be worth noting is that this mapped domain was actually an imported/cloned site from a standalone install.

    Thank you!

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    The only time a network subdirectory installation would be a problem is if you are dynamically allocating subdomains to blog sites. When using the subdirectory method it’s not a problem.

    The first thing I would check for is if there is a real subdirectory on the server that matches the directory you assigned for the sub-site. If this is so, you need to rename one or the other. The the proper rewrite base /main/ should work in all cases.

Viewing 1 replies (of 1 total)
  • The topic ‘Multisite with one Mapped Domain htaccess problems’ is closed to new replies.