[resolved] Registration redirect on sub-site link incorrect (4 posts)

  1. adriaank
    Posted 5 years ago #


    When I try to register a user from a sub-site it redirects to the mainsite withwout the www protocol infront.

    I am using /subdirectories and not subdomains

    The link is perfect generated: http://www.mysite.com/subsite/wp-login.php?action=register

    When clicked it resolves to

    http://mysite.com/wp-signup.php (and results in a "Error establishing database connection" error)

    wp-admin and wp-login have no problems.

    My .htaccess looks like this:

    '# BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    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).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    # END WordPress'

    Any ideas where I went wrong?

    I have correctly specified

    'define( 'DOMAIN_CURRENT_SITE', 'www.mysite.com' );' in wpconfig.php as well

  2. Does http://mysite.com work on it's own?

    It shouldn't matter, really... I mean, the URL is right, and your server should be smart enough to know www is the same as non-www.

  3. adriaank
    Posted 5 years ago #

    I was thinking that same thing, http://mysite.com does not work at all, only when I prefix it with www.

    Just getting a "Error establishing database connection" when hitting the http://mysite.com

  4. adriaank
    Posted 5 years ago #


    define( 'DOMAIN_CURRENT_SITE', 'mysite.com' );

    :) My previous claim of having www in the above line was not true....

    Double checked it and picked it up, added www and working fine.


Topic Closed

This topic has been closed to new replies.

About this Topic