So I just setup my website fightify.com and as you will see, visitors are automatically redirected to a signup page, which shouldnt be happening.

This only occurs if the domain is typed without the www. prefix. www.fightify.com yields no errors.

I have a feeling that it has something to do with the .htaccess file, but I'm no coder, and have no idea how to fix it.

Has anybody seen this happen before?

Yes, I've dealt with this before. You have to specify a NOBLOGREDIRECT in your wp-config.php file:

define( 'NOBLOGREDIRECT', 'http://www.fightify.com' );

If there's no site, WP has to redirect visitors somewhere. By default, that's the signup page. Adding that constant tells it where to go.

  • This worked perfect, thanks a million! – user3994 Mar 16 '11 at 19:34
  • @marketer365: since it worked, could you please mark my answer as accepted? – John P Bloch Mar 17 '11 at 16:46
  • I've set NOBLOGREDIRECT and requests for the main site that should 404 instead redirect 302 -> 200 to the NOBLOGREDIRECT URL. Apparently this is the intended behavior but it surprised me and it seems wrong. – sam Aug 9 '12 at 18:01
  • 2
    The solution to the 404 problem can be found here: remove_action( 'template_redirect', 'maybe_redirect_404' ); – brasofilo Jul 17 '13 at 17:56
  • @brasofilo been long but still useful. Should be added to the Answer. Without that every 404 request will also be redirected to NOBLOGREDIRECT. – Gangesh Dec 15 '16 at 9:19

I handle this issue with the WordPress MU Domain Mapping plugin.

I run my WP3 Network in subdirectory mode, and just assign domain names via the plugin, including any alternate domains. It's worked well for me, thus far.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.