How to prevent a 404 Error when installing a subdomain using a wordpress multi-site installation

Posted by Chris on Pro Webmasters See other posts from Pro Webmasters or by Chris
Published on 2014-06-03T13:27:31Z Indexed on 2014/06/03 15:56 UTC
Read the original article Hit count: 277

I have installed a multi-site instillation of WordPress onto my domain. I then added the necessary code to the wp-config.php file and .htaccess as instructed by WordPress.

I also installed a plugin called Quick Page/Post Redirect Plugin which allowed me to place a 301 redirect onto the main domain as I only want to use the sub domain and not the main domain. Then I also added the following line of code to the wp-config.php file to redirect the main domain define( 'NOBLOGREDIRECT', 'URL Redirect Address' );

The site works fine with a redirect on the main domain and my subdomain runs fine when you type in subdomain.domain.com or http://subdomain.domain.com.

However when I enter www.subdomain.domain.com or http://www.subdomain.domain.com the following error message is returned:

Not Found

The requested URL / was not found on this server.

Apache/2.4.9 (Unix) Server at www.subdomain.domain.com Port 80

Any help with this would be much appreciated.

© Pro Webmasters or respective owner

Related posts about htaccess

Related posts about Wordpress