• Resolved newvibe

    (@newvibe)


    I’ve got a brand new install of wordpress 4.0, which I have converted to a network site. When I add a new site, I get a 404 error at the new subdomain for the site home, login, admin folder etc.

    Reading about this problem, the most common cause is that the .htaccess file is not being read. Mine is. Permalinks are working on the main site and I have this running on a server where AllowOverride All is already set globally for ‘/’ in httpd.conf.

    I have also confirmed that my wildcard DNS is working, because when I ping any subdomain, I get the same IP address as the main site.

    My .htaccess and wp-config settings are below. Please help! 🙂

    Here is my .htaccess:
    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).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    wp-config.php contains:
    /* Multisite */
    define( ‘WP_ALLOW_MULTISITE’, true );

    define(‘MULTISITE’, true);
    define(‘SUBDOMAIN_INSTALL’, true);
    define(‘DOMAIN_CURRENT_SITE’, ‘notSharing.com’);
    define(‘PATH_CURRENT_SITE’, ‘/’);
    define(‘SITE_ID_CURRENT_SITE’, 1);
    define(‘BLOG_ID_CURRENT_SITE’, 1);

Viewing 3 replies - 1 through 3 (of 3 total)
  • Is this part above the “That’s it, stop editing” line?

    /* Multisite */
     define( 'WP_ALLOW_MULTISITE', true );
    
    define('MULTISITE', true);
     define('SUBDOMAIN_INSTALL', true);
     define('DOMAIN_CURRENT_SITE', 'notSharing.com');
     define('PATH_CURRENT_SITE', '/');
     define('SITE_ID_CURRENT_SITE', 1);
     define('BLOG_ID_CURRENT_SITE', 1);

    Or, backup your .htacess file and replace everything with this.

    # BEGIN WordPress
    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]
    
    # END WordPress
    
    # BEGIN wtwp_cache
    # END wtwp_cache

    Thread Starter newvibe

    (@newvibe)

    Thanks for the help. Yes, the php code is above the “That’s it…” line.
    I have replaced everything in .htaccess with what you provided, but it has not helped.

    Thread Starter newvibe

    (@newvibe)

    OK, here’s how I goofed…

    Creating an ‘A’ record is only going to allow the wildcard subdomain to resolve. It does not to create a vhost for the wildcard in the apache configuration which is responsible for serving web content.

    I had simply created an A record to direct traffic, when what I really needed to do in cPanel was add *. as a subdomain. cPanel took care of the rest and everything works now. I hope this helps someone at some point 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘404 Errors with New Sites in Network’ is closed to new replies.