Bad redirection from root domain

Hello,

I use Pro SIte and when I type mydomain.com it redirects to mydomain.com/pro-sites/?action=new_blog .
Normally it should redirect to mydomain.com or at least http://www.mydomain.com

Thank to tell me to retrieve the good way .

  • Nithin

    Hi Xavier,

    Hope you are doing good today. :slight_smile:

    This seems to be related to having a redirect to non WWW domain path, and when you add www to it works. Could you please send us your credentials so that we can have a closer look?

    You can send credentials by using our secure contact form: http://premium.wpmudev.org/contact/

    Select “I have a different question” for your topic.

    - To Mark to my attention, the subject line should contain only: ATTN: Nithin Ramdas
    -WordPress admin username
    -WordPress admin password
    -login url
    -FTP credentials (host/username/password)
    -link back to this thread for reference
    -any other relevant urls

    Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Nithin

    Hi Xavier,

    Hope you are doing good today. :slight_smile:

    I checked your website, and was testing it extensively, and found out that you are having custom rewrite rules in your .htaccess file for a single site install, along with your multisite rules. I have removed these rules out. To correct the redirection issue, I had to add the following rules in your .htacess file. The file is located in your root directory.

    RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

    The above code should fix the redirection, and your website now seems to work fine. Please check, and confirm if I have missed out anything. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Nithin

    Hi Xavier,

    Thanks for pointing that out, I checked you files further, and I could see redirects to https in wp-config.php, which I believe is not needed since you are using http.

    I made some more changes in your .htaccess file, as shown below:

    RewriteCond %{HTTP_HOST} ^youDomainName.com$ [NC]
    RewriteRule ^(.*)$ http://www.yourDomainName.com/$1 [L,R=301]

    And defined NOBLOGREDIRECT in your wp-config.php file.

    I did give a test, and your multisite now seems to work fine, please check, and let me know how that goes. You can find your old .htaccess, and wp-config.php file in your root location, it's renamed with the keyword old as prefix. eg: old-htacess, old-wp-config.php

    Have a nice day. :slight_smile:

    Kind Regards,
    Nithin