WordPress.org

Forums

[resolved] Permalinks in subfolder multisite installation (16 posts)

  1. da1k
    Member
    Posted 2 years ago #

    Hello,

    I installed fresh WP and create network in domain using WP tutorials (mysite.com). I also added another domain (example.com) using WordPress MU Domain Mapping but when I enter address example.com I am redirected to http://www.mysite.com/example and all post has address http://www.mysite.com/example/2013/02/postname. How can I change this to http://www.example.com/2013/02/postname?

    best regards,

  2. Did you set example.com as the primary domain for http://www.mysite.com/example

  3. da1k
    Member
    Posted 2 years ago #

    No. When I changed it is OK now. Thank you.

    One more question. Can I set up more than one primary domain? If in future I will add another domains would it be possible to set up proper permalinks?

  4. No, you can only have one 'primary' domain. The rest would be secondary, and redirect to the primary.

    You really never want to have multiple domains with 100% the same content.

  5. da1k
    Member
    Posted 2 years ago #

    I though about situation that one day I will decide to make next blog or webpage, about something completely different with new domain (ie.: newdomain.com) and than I will just make new blog inside my network (mysite.com/newdomain) and redirect to new domain and my permalink will be like this: newdomain.com/2014/01/postname. Is it possible ?

    PS. You are right I am not gonna make 10 websites with the same content. It doesn't make a sense :)

  6. da1k
    Member
    Posted 2 years ago #

    I made a test. For a moment I set up my another website (mysite2.com) to folder where I installed WP, I made new site mysite.com/mysite2 and I mapped mysite2.com domain to mysite.com/mysite2 and it looks that permalinks are correct and both domains (mysite.com and mysite2.com) are set to be primary. Could it be done like that? Or should I expect some problems in future?

  7. I will just make new blog inside my network (mysite.com/newdomain) and redirect to new domain and my permalink will be like this: newdomain.com/2014/01/postname. Is it possible ?

    Yes, that's how it's supposed to work.

    it looks that permalinks are correct and both domains (mysite.com and mysite2.com) are set to be primary.

    No. You cannot have two 'primary'

    Go to /wp-admin/network/settings.php?page=dm_domains_admin

    You'll see 'Site ID - MAPPED domain name - Primary'

    If you have more than one domain mapped to a site ID, only ONE should be primary.

    Also mysite.com (the MAIN domain) must NEVER be mapped. You can't map site #1

  8. da1k
    Member
    Posted 2 years ago #

    If you have more than one domain mapped to a site ID, only ONE should be primary.

    All (3) domains are set to main :/ but not this with ID 1. I don't understand something and if you can be so kind and try to explain me something.

    I have three websites build on WP (mysite.com, example.com, mysite2.com). Because maintain them takes me too much time I wish to have one WP installation with connected domains. I read twice: http://codex.wordpress.org/Before_You_Create_A_Network and http://codex.wordpress.org/Create_A_Network and I understood that it should be possible. I made a fresh WP install (with new database) for mysite.com, I made a network (directory base because I can't set up subdomain base) for mysite.com, install WordPress MU Domain Mapping and then I discovered problem with permalinks. So is it possible to have (and how to do it):

    1. mysite.com and permalink mysite.com/2013/02/postname
    2 example.com and permalink example.com/2013/02/postname
    3. mysite2.com and permalink mysite2.com/2013/02/postname

    Please help me,

  9. Site ID 1 is your MAIN domain.

    You can'd do anything to it. Leave it alone.

    So is it possible to have (and how to do it):

    1. mysite.com and permalink mysite.com/2013/02/postname
    2 example.com and permalink example.com/2013/02/postname
    3. mysite2.com and permalink mysite2.com/2013/02/postname

    Yes. You're over thinking ALL of this.

    1. Install Multisite in mysite.com and use it like you would normally.
    2. Activate Multisite subdomains (trust me on this one)
    3. Make example.mysite.com and mysite2.mysite.com
    4. MAP THOSE TWO SITES to example.com and mysite2.com
    5. Go have a beer.

  10. da1k
    Member
    Posted 2 years ago #

    1. Install Multisite in mysite.com and use it like you would normally.
    2. Activate Multisite subdomains (trust me on this one)
    3. Make example.mysite.com and mysite2.mysite.com
    4. MAP THOSE TWO SITES to example.com and mysite2.com
    5. Go have a beer.

    It did as you wrote so now I have in my Sites:
    Domain - mapping
    mysite.com - blank
    example - example.com
    mysite2 - mysite2.com

    and in Domain Mapping: Domains:
    Site ID - Domain - MAPPED domain name - Primary
    3 - mysite2 - mysite2.com - Yes
    2 - example - example.com - No

    Permalinks on mysite.com are OK, on mysite2.com they are also OK. But when I input example.com than I am redirected to example.mysite.com. Which is useless for me. So if I can't have more than one primary domain how can I have example.com not example.mysite.com with proper permalinks and using one WP installation?

    PS. mysite.com, mysite2.com and example.com have different content. Until I installed WP they were different standalone websites.

  11. In general, you NEVER have more than one domain for the content, it's just a bad idea.

    So if I can't have more than one primary domain how can I have example.com not example.mysite.com with proper permalinks and using one WP installation?

    Don't map the domain, mirror it and only use relative links in everything you do.

    I will point out the ORIGINAL question was just about domain mapping. Why do you think you need to have two domains with 100% the same content?

  12. da1k
    Member
    Posted 2 years ago #

    I think I expressed poorly and you didn't understand me well. I hope this time I will be better.

    1. I know and I never wanted to have two (or more) sites with the same content. It is stupid and I promise to don't do this. Never :)

    2. What I want to do is to have ONE installation of WordPress with three sites inside. Let we say that mysite.com is about flowers, mysite2.com is about cars, and example.com is about planes.

    3. As I understood multisite is right for me. I already did what you wrote (and this is similar to my original state) but the problem is in permalinks. Because for non primary site (here about planes) I receive permalinks like: planes.flowers.com/2013/airbus330 instead of planes.com/2013/airbus330. How to change it ?

    PS. Sorry for my english but is not my mother language.

  13. Because for non primary site (here about planes) I receive permalinks like: planes.flowers.com/2013/airbus330 instead of planes.com/2013/airbus330. How to change it ?

    You make the mapped domain Primary. That's all :) You did it totally right on the other sites!

    and in Domain Mapping: Domains:
    Site ID - Domain - MAPPED domain name - Primary
    3 - mysite2 - mysite2.com - Yes
    2 - example - example.com - No

    See how the last one you say 'Primary NO'

    Change that.

  14. da1k
    Member
    Posted 2 years ago #

    See how the last one you say 'Primary NO'

    but you wrote:

    No. You cannot have two 'primary'

    ?

  15. 2 - example - example.com - No

    Right, if you want example.com to be the primary, make it primary.

    Every site ID gets one primary domain. Pick one. Go with it :)

    You only listed ONE domain for Site 2. If there are more, you're not telling me...

  16. da1k
    Member
    Posted 1 year ago #

    OK. It is works. Thank you.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.