Multisite – 404 when accessing sub-sites

Setting up a multisite on a blog which root url is dev.domain.com, using subdomains. So, for example, a subsites address : site1.dev.domain.com

Everything works fine as long as i stay on the main site (dev.domain.com)
When i try to access any of the other sites, I get a 404 error.

Read More

Here is my .htaccess sitting in the root

<IfModule mod_rewrite.c>
# BEGIN WordPress
RewriteRule ^index.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [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).*) $1 [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(.*.php)$ $1 [L]
RewriteRule . index.php [L]
# END WordPress

</IfModule>

Any hint as to what is causing the 404 or suggestions to solve it would be much appreciated.

Related posts

Leave a Reply

2 comments

  1. You must also register the wildcard domain *.dev.domain.com (The asterisk in as the sub-domain will usually allow you to create any sub domain you want and it will work) and point it to your main site. You can normally do this through you host’s Control Panel. I didn’t do this when I started with WPMU and this is what I missed.

  2. Can you go back to wp-config.php and add this line

    define('WP_ALLOW_MULTISITE', true); //change it to false afterwards  
    

    Can you then go to /wp-admin/network/setup.php and check you copied everything correctly.

    It looks to me you altered the .htaccess and missed a few lines

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

    And you’ve put your code inside <IfModule mod_rewrite.c> which is not in the WordPress instructions