WordPress.org

Support

Support » Multisite » [Resolved] Site without prefix(www.) keep redirect to the signup page.

[Resolved] Site without prefix(www.) keep redirect to the signup page.

  • eric_liang
    Member

    @eric_liang

    hi guys,
    I got a huge problem when I type: domain.com
    it keep redirects me to sign up page.
    I tried using :
    define( 'NOBLOGREDIRECT', 'http://yourdomain.com/' );

    but it makes my 404 page doesn’t work.

    Any thoughts?

Viewing 5 replies - 1 through 5 (of 5 total)
  • You could try an .htaccess redirect though define( 'NOBLOGREDIRECT', 'http://yourdomain.com/' ); says ‘If there’s no blog, go to http://yourdomain.com/‘ and it SOUNDS like you mean ‘If there’s no blog, go to http://www.yourdomain.com/

    So you shoulda used define( 'NOBLOGREDIRECT', 'http://www.yourdomain.com/' );

    htaccess will look something like :

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^your_domain.com$
    RewriteRule ^(.*)$ http://www.your_domain.com/$1 [R=301]

    Put it on the top of your .htaccess, well above the WP section.

    eric_liang
    Member

    @eric_liang

    I tried, it’s not working 🙁
    showed up this:

    Moved Permanently

    The document has moved here.

    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

    eric_liang
    Member

    @eric_liang

    oh I tried the define( 'NOBLOGREDIRECT', 'http://www.yourdomain.com/' );

    when I did that, it works but my 404 page doesn’t work. so I removed that back. I want both to work.

    when I did that, it works but my 404 page doesn’t work.

    What theme?

    eric_liang
    Member

    @eric_liang

    got it! got it! thanks ipstenu! I cleared the cache and it works with the code that you gave(htaccess)..

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Site without prefix(www.) keep redirect to the signup page.’ is closed to new replies.