WordPress.org

Ready to get started?Download WordPress

Forums

Multisite error with URL (13 posts)

  1. fvd_18
    Member
    Posted 9 months ago #

    I am new with WordPress. I have a multisite set for English and Spanish. Both sites are running, the English site works perfectly as http://www.site.org but the Spanish, I can't get it to run as http://www.site.org/es instead it only works as http://site.org/es or if you just use http://site.org. It automatically sends it to the Spanish if you don't use the www. Need some help to review what I am missing. Thanks.

  2. Did you set up noblogredirect in wp-config?

    if not, you may as well just force non-www in your .htaccess

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !^site.org$ [NC]
    RewriteRule ^(.*)$ http://site.org/$1 [L,R=301]
  3. fvd_18
    Member
    Posted 9 months ago #

    I don't have the noblogredirect in the wp-config. I will need to review the .htaccess. Just to check, I want to have the English site to work with the http://www.site.org and the Spanish to work was http://www.site.org/es. Stop the non www usage and set both sites to work with the www. Thanks.

  4. Eh. Generally we suggest you NOT use www.

    The reason it's not working is to do with your server, probably, and not WP. WP can only know ONE URL, and if you set up the home/site URLs are non-www, then you must forever be non www.

  5. fvd_18
    Member
    Posted 9 months ago #

    The home URL is set using www. When I created the Spanish page, it only allows me to use the non www, if I use the www it fails. The domain inside the multisite only allows me to be a non www, the same for the site url and home. Not sure if that is something that needs to be define it another file or can be overwritten?

  6. ypage621
    Member
    Posted 9 months ago #

    I'm having the same error but backwards. When you go to http://mxcc.edu/ce/healthcare/ for example, you get to the right page. However, if you add the www in (http://www.mxcc.edu/ce/healthcare/) my site's redirecting to the hompage. Strangely enough an extra backslash after the url makes it work (http://www.mxcc.edu//ce/healthcare/). I have been wracking my brain with trying to figure out where the extra backslash is coming from/why the www isn't working. My multisite has a subsite mxcc.edu/catalog installed and that works just fine when I add the www in front of it. I tried the non-www force in .htcaccess and that didn't work for me.

  7. ypage621
    Member
    Posted 9 months ago #

    Oh I got it. I put the force at the top of htcaccess and it worked. DUH!!! Thanks Ipstenu. Hope you're problem is fixed too fvd_18!!

  8. fvd_18
    Member
    Posted 9 months ago #

    ypage621, can you show me the code you have in the .htaccess to have an idea of what I might be doing wrong. Yesterday I added the code and it didn't work for me. Thanks.

  9. ypage621
    Member
    Posted 9 months ago #

    I copy and pasted
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !^site.org$ [NC]
    RewriteRule ^(.*)$ http://site.org/$1 [L,R=301]

    and changed site.org to my site's name in both spots. I placed it at the very top of the file above all the WP multisite info and it worked. Originally I had put it at the bottom of the file and it wasn't working.

  10. tiendat756@gmail.com
    Member
    Posted 9 months ago #

    Oh I got it. I put the force at the top of htcaccess and it worked. DUH!!! Thanks Ipstenu. Hope you're problem is fixed too fvd_18!!

  11. The home URL is set using www. When I created the Spanish page, it only allows me to use the non www, if I use the www it fails.

    So. When you were setting up WP for Multisite, and it told you 'Don't use WWW' you skipped that?

    Right, the fix is going to suck.

    You'll need to go into the DB and look for all instances of http://www.site.com and change it to site.com CAREFULLY. Make a backup first.

  12. fvd_18
    Member
    Posted 9 months ago #

    To be honest, I didn't saw the part for the "Don't use WWW". I tested it before using it on a test site and it didn't give me any information about the www. I will review doing the DB search, making a backup of all the information. Thanks Ipstenu.

  13. There is a warning as you activate multisite, if your site is using www in the home and site URLs. It's specifically there because of this :/

    You nee to check the following:

    wp_site
    wp_sitemeta (look for home and siteurl)
    wp_blogs

    And THEN all the posts.

    And you can use this: http://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    Search for http://www.site.com replace with site.com

    Still check those three tables though

Reply

You must log in to post.

About this Topic

Tags

No tags yet.