WordPress.org

Ready to get started?Download WordPress

Forums

Networks for WordPress
Second network non-www redirects to first network domain (7 posts)

  1. leannel
    Member
    Posted 1 year ago #

    I have WordPress multisite set up for subdomains - currently on versions WordPress 3.4.2, Networks for WordPress 1.1.3. Both networks have been set up with the www in the domain address.

    The issue I am having is when I type in the domain address of my second network without the www I get redirected to the first network's main domain. If I type the domain address with the www it resolves to the correct domain.

    So specifically this is my set up:

    Network 1: http://www.parkquip.com.au
    Network 2: http://www.bbqsrusqld.com.au (on this domain the non-www redirects to http://www.parkquip.com.au)

    Have searched all morning for an answer but can't seem to find one. Any suggestions would be greatly appreciated :)

    http://wordpress.org/extend/plugins/networks-for-wordpress/

  2. leannel
    Member
    Posted 1 year ago #

    Update:

    Actually I now just realised that every link on the second network site redirects to the first network main site even though they are absolute links not relative :`(

    I hope someone can help me...

  3. David Dean
    Member
    Plugin Author

    Posted 1 year ago #

    Hi leannel -

    I took a look at your site but am not seeing the redirects you mention.

    I am able to get to, e.g. http://www.parkquip.com.au/park-bbq-range/portable-bbq/ and also http://www.bbqsrusqld.com.au/filters/brick-in/ by browsing each site.

    Did you figure it out or is there something I'm missing about this problem?

  4. leannel
    Member
    Posted 1 year ago #

    Hi and thanks for the reply.

    I will try to better explain the problem :)

    The issue I'm having is that when you type the web address as http://www.bbqrusqld.com.au (with the www) it opens the correct website. However when you type the web address as http://bbqsrusqld.com.au (without the www) it redirects to http://www.parkquip.com.au - this is NOT correct. There are no redirects in place to do this and it should open up the bbqsrusqld site NOT parkquip site.

    The parkquip site is the main website for the first network I set up under wordpress multisites (with a sub-domain install). WordPress is installed in the root of this domain. Then I installed your plugin to activate multiple networks. The bbqsrusqld site is the main site for the second network created using your plugin.

    Both networks were created using www in the domain address - I have now read many cases where they say not to do this but it wasn't evident at the time and I cannot really change this now.

    So I need to know why the website on the second network redirects to the first network website when you type the domain name without the http://www.... I really hope that makes sense!

    Overall my structure looks like this:

    Network 1: http://www.parkquip.com.au
    Network 2: http://www.bbqsrusqld.com.au (this is the site that redirects back to the above site when you don't use www in the domain address).

    Sincerely hope this is a little clearer and very much appreciate your help!!!!

  5. leannel
    Member
    Posted 1 year ago #

    Ok I have spent the last day trying to figure this out and triple checked the install and how I have things set up. I have also re-read through almost every one of the previous support requests looking for hints or answers.

    Both network domain names point to the root install of wordpress - I am pretty sure this is correct?

    I have a dedicated IP for my hosting and a wildcard configured in the A record for the first network domain - not sure if this is needed for your plugin but thought I'd mention it to be thorough.

    I found that I did not have the DEFINE_CURRENT_SITE properly commented out in the wp-config file so corrected this.

    The result:

    Now you can view my two network's main domains with no redirection happening so long as you type the address WITH the www.

    But...

    If you type the address WITHOUT the www still have an issue - I now get the following error:

    No site defined on this host. If you are the owner of this site, please check Debugging a WordPress Network for help.

    Also, I have 301 redirects for alternate domains (e.g. parkquip.net, parkquip.com) to go to my the main site http://www.parkquip.com.au. These redirects worked just fine previously (before I fixed the commenting out in the wp-config file) but now none of these redirects work and return the same error as above.

    Is this an issue with setting up the networks originally using the www in address? Or an issue with my .htaccess file? The 301 redirects are set up using my host account (I use GoDaddy). I have not added the redirects to my .htaccess file as they previously created a conflict there but seemed to work when set up directly on the host.

    This is what is in my current .htaccess file:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]

    Would really like to get this working properly as I have a number of networks still to add and much work to do with a client on my back :( Very much appreciate some help.

  6. leannel
    Member
    Posted 1 year ago #

    Sorry, for ease of checking what I mean I should have added the website links rather than ask you to type them....sorry!

    Now working correctly:
    Network 1: http://www.parkquip.com.au
    Network 2: http://www.bbqsrusqld.com.au

    NOT working correctly:
    Network 1: http://parkquip.com.au
    Network 2: http://bbqsrusqld.com.au

    Redirects now NOT working (there are only redirects on Network 1):
    http://www.parkquip.com
    http://parkquip.com
    http://www.parkquip.net
    http://parkquip.net
    http://www.parkquip.net.au
    http://parkquip.net.au

    AND I just discovered that the above redirects are now being sent to http://parkquip.com.au (WITHOUT the www) so this is probably why they are showing the same error.

    I am sorry for the length of my comments but if I give you as much information as I can I hope it makes it easier for you to get the picture of what is happening and in turn makes it faster for a resolution - fingers crossed :)

  7. David Dean
    Member
    Plugin Author

    Posted 1 year ago #

    TBH I'm not sure what the issue is here. It sounds like you've done everything right on the server configuration side. However -

    Both networks were created using www in the domain address - I have now read many cases where they say not to do this but it wasn't evident at the time and I cannot really change this now.

    This MIGHT be the key to your troubles. Since you're so close, you may want to set up some .htaccess rules to redirect everything to the www. address rather than re-creating your sites.

    Here's a post with some good samples of generic URL-rewrites (check out the answer by Dmitriy for this exact case): http://stackoverflow.com/questions/234723/generic-htaccess-redirect-www-to-non-www

    I don't really understand your other domain redirects (from parkquip.com, parkquip.net, etc.). Can you change them so they redirect to http://www.parkquip.com.au?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.