Getting 404 on subfolders multisite setup

Recently there was an issue with htaccess being created in the uploads folders, I haven’t updated or installed anything and now when I create subsites I just get a 404 when I try to access the subsites with subfolder setup.

I’m using the domain mapping option explained in the WordPress docs, which requires only to manually chage the site URL to the domain I will map and adding the domain as addon, the sites that are mapped work but the subsites that are using the subdirectory just throw a 404 error (admin area or front-end).

Tried clearing cache with a plugin but got the same issue.

This is the main domain of the multi-site http://lifestyleadvisers.net.au

This is one of the subsites http://lifestyleadvisers.net.au/devsite/wp-admin/

Thanks in advance!

  • Kasia Swiderska
    • Support nomad

    Hello Lisa,

    It should be working now. Please check and confirm it is also working on your side.

    Issue was that main .htaccess file was empty so permalinks were not working. I have added there rules

    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]

    and sites, and pages are working again – no more 404 error.

    kind regards,

    Kasia

  • Lisa
    • New Recruit

    Hi Kasia,

    Thanks for your reply, I have actually worked out what the problem is. I compared both sites and found that it is a back end problem. When I create an add-on domain, the sub-domain that is created with it is given a root directory of the same name (home/add-on domain name) rather than home/public_html! I changed all of these and it works now!