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.
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.
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.
Can you go back to wp-config.php and add this line
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
And you’ve put your code inside
<IfModule mod_rewrite.c>
which is not in the WordPress instructions