How to prevent a 404 Error when installing a subdomain using a wordpress multi-site installation
- by Chris
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.