WordPress.org

Ready to get started?Download WordPress

Forums

Permanent redirect of just 1 blog in multisite from subdirectory to subdomain (17 posts)

  1. csigncsign
    Member
    Posted 3 years ago #

    Hi,

    I have following conditions:

    - Subdomain "testblog" is established
    - Main domain "max-mustermann.de" exists

    The main domain is a WP 3.0.1 multisite with several blogs in it. These blogs are all in subdirectories and this is ok.

    But for 1 blog in this system, I would like to call only this one blog by a subdomain.

    The content for it is at the moment in the subdirectory:

    http://max-mustermann.de/testblog/

    Is there a chance to do this within the wordpress installation or is it only possible by a permanent redirection via htaccess?

    http://max-mustermann.de/testblog/

    should be redirected to the subdomain

    http://testblog.max-mustermann.de/

    However, it should be so, that all posts/pages have the subdomain name in front of it like this for example:

    http://testblog.max-mustermann.de/2010/08/a-new-post/

    Has anybody an idea?
    Thanks a lot in advance, and sorry for my bad English.

    Alex

  2. Use the domain mapping plugin and instead of mapping a different domain, use a CNAME to map the subdomain.

    http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

    http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/

  3. csigncsign
    Member
    Posted 3 years ago #

    Thanks a lot, Andrea!

    After a long trials how to set "CNAME" and what it is and where to get it, I now have finished and it works fine now.

    I can't say, how happy I am about your help; I've tried it without success with htaccess redirections, but this failed.
    But with your method, all is fine.

    Thanks so much, you made my day :-))

  4. csigncsign
    Member
    Posted 3 years ago #

    Hi,

    I discovered one problem: the URL of the feed does not work now any longer:

    http://max-mustermann.de/testblog/feed/

    was the old adress of the feed, that works.
    After the domain mapping to the new blog address

    http://testblog.max-mustermann.de/

    the feed URL

    http://testblog.max-mustermann.de/feed/

    shows just the home page; and the old path, before mapping,

    http://max-mustermann.de/testblog/feed

    does not work any longer. No chance to get a feed with these URLs.

    How can I get my feed back?

    Thanks.

  5. You may need to go edit the blog details under Super Admin -> Sites, find the blog, hover over the name click edit - then change all the subfolder references to the subdomain.

  6. csigncsign
    Member
    Posted 3 years ago #

    Unfortunately, I have done something wrong at my hoster's settings ... I don't know exactly, what.
    So this blog is "not found" at all, only the backend.

    Is it possible to start from the very beginning, if I

    - reset my hoster's settings (delete CNAME)
    - delete the plugin
    - reset the changes of the wp-config.php
    - delete the settings in the database called "domain_mapping" and "domain_mapping_logins"
    - anything else?

    Is then everything as it was before, to start from the beginning with the mapping?

    Thanks, Andrea, for your patience.

  7. Yes, that sounds correct.

    Also make sure you put the domain-mapping.php plugin in the mu-plugins folder, and NOT just in the regualr plugins folder.

    If that;s the case, that might be all you need to do.

  8. csigncsign
    Member
    Posted 3 years ago #

    ok, thanks, I had created that special mu-plugin folder like your tutorial link said.

    Now I try my luck again, and start from the beginning.
    Thanks at this point for your help.

  9. csigncsign
    Member
    Posted 3 years ago #

    Uff, the reset of the complete domain mapping has worked, as I have described above, with exact these steps, if somebody else needs to do it, too.

    I guess, tomorrow I will start this from new.

  10. csigncsign
    Member
    Posted 3 years ago #

    Unfortunately, after resetting all, I cannot re-create this domain-mapping. I restored my database to yesterday, where I saved it, so that no entry could be there from the domain mapping tests, and deleted every plugin/file from this domain mapping from FTP.

    I have done this like your tutorial link:
    http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/

    1. at my hoster, I gave the CNAME of my subdomain http://testblog.my-domain.de this CNAME: testblog.my-domain.de
    Then I waited, until at the hoster the status of this changes is "ready".

    2. Then I put the sunrise.php and the mu-plugin-folder in wp-content

    3. put the sunrise-code into wp-config.php

    4. Superadmin -> Domain Mapping Configuration
    There I set the "Server CNAME domain" to this: testblog.my-domain.de.
    Is this right, without http?

    5. I go to the admin area of this blog -> Tools -> Domain Mapping:
    Add domain testblog.my-domain.de and set as primary.

    The result is, that my blog cannot be called by this subdomain:
    http://testblog.my-domain.de with the error "server not found".
    The old adress with subdirectory http://my-domain.de/testblog/ shows "server not found", too.

    What can I do now?

    Thanks in advance.

  11. step 4: no, that;s not right. put in your A record so the subdomain knows where to go. That value is GLOBAL.

  12. csigncsign
    Member
    Posted 3 years ago #

    But in your first post you wrote "use a CNAME to map the subdomain."?

    ok, I should put the IP of this subdomain in

    "Domain Mapping Configuration" --> "Server IP adress"

    and not

    "Domain Mapping Configuration" --> "Server CNAME domain"

    ?

    And don't set a CNAME at the hoster?

  13. Don't set a CNAME as the hoster, because you're using a subdomain with a CNAME record to map it to the install.

  14. csigncsign
    Member
    Posted 3 years ago #

    It is very hard for me to understand, because my English is not so good, what do you exactly mean by "using a subdomain with a CNAME record to map it to the install"?

    If I have understand you right, I only look at my hoster's account for the A-RECORD-IP for this subdomain, right?

    And this IP do I put into "Domain Mapping Configuration" --> "Server IP adress" line here:

    http://ottopress.com/files/2010/06/domainmapping3.png

    ?

    Sorry, but I really have now fear, to block my site again :-(
    Thanks, Andrea.

  15. If I have understand you right, I only look at my hoster's account for the A-RECORD-IP for this subdomain, right?

    No. the only IP address you need to pay attention to is the IP address that holds your network install.

  16. csigncsign
    Member
    Posted 3 years ago #

    It is really a desperate fight with this domain mapping :-(
    I don't get it to work any more ...

    Using the IP, that is mentioned at my hoster's account (same for subdomain as for main domain) causes a "server not found", too, if I add it in the domain mapping config area, and set in my blog's tools -> domain mapping area the subdomain's name "testblog.my-domain.de".

    I really don't have any idea how to cope with it.

  17. csigncsign
    Member
    Posted 3 years ago #

    I've got it!

    The problem and the only problem was, that at my Provider the subdomain directs to the root of the server, but the main installation of WordPress was in an subfolder (where the main domain points to it, too).

    I just point the subdomain to this directory at the server and then follow the tutorial of Otto:

    http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/

    using the server IP and no CNAME. The server IP can be pinged by Windows with START -> EXECUTE (don't know the English name for this menu) -> CMD -> and then ping http://your-domain.de.

    Then the installation goes like Otto said. For all Germans, who have this problem, too, is there a very good tutorial video at Youtube:

    http://www.youtube.com/watch?v=4jN4kEzkE4U&feature=related

    or a tutorial with step-by-step at the German WP forum here:

    http://forum.wordpress-deutschland.org/konfiguration/73877-domainmapping-blogs-andere-domain-zuweisen-das-tutorial.html#post338720

    It works now very fine for me. Thanks to Andrea, too, for your patience and help :-)

Topic Closed

This topic has been closed to new replies.

About this Topic