Error 404 on Network Admin and others

I have a multisite fresh install in my domain. Subfolder setup.

Network Admin on the upper right menu has this link http://example.com/wp-admin/network/ and returns a 404 error. Other links like ‘Add New’ have this problem too. I can manually visit http://example.com/subfolder/wp-admin/network/ and works fine.

Read More

I’m not good with .htaccess but I think the problem is there; can you check this please:

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) home/content/70/10156275/html/example.net/subfolder/$1 [L]
RewriteRule ^(.*.php)$ home/content/70/10156275/html/example.com/subfolder/$1 [L]
RewriteRule . index.php [L]

Also, not sure if this helps but my wp-config.php has this code:

/* Multisite */
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', true );
$base = '/';
define( 'DOMAIN_CURRENT_SITE', 'example.com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );

I have been searching Google for 2 days now and can’t fix this…
The problem is the subfolder is somewhat omitted in Network Admin and some few…

Related posts

Leave a Reply

1 comment

  1. The problem is that your .htaccess rules are referencing a path outside of the document root, which is not allowed in .htaccess files.

    Here is the complete working code for your .htaccess file.

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) /subfolder/$1 [L]
    RewriteRule ^(.*.php)$ /subfolder/$1 [L]
    RewriteRule . index.php [L]
    

    The code in your wp-config.php file is correct and therefore requires no change.