Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Ron Rennick

    (@wpmuguru)

    Just for clarification for anyone reading the thread – Domain mapping will work in 3.5.X as long as WP is installed in the root.

    The issue above wasn’t the WP version. It was that WP 3.5.X allows you to install WP in its own folder (which isn’t supported by DM yet).

    Hi Ron.

    Do you have an ETA for when DM will support non root installs of WP?

    Thank you,
    Steve.

    Plugin Author Ron Rennick

    (@wpmuguru)

    I created a new install in a folder for another research project so I’m half way there. If I get some time to look at it this weekend I may have something by the first of the week,

    Hi!

    I have wordpress in its own directory, as described here: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    So, my sites are at the domain root, but wordpress is installed in /wordpress.
    In this situation, this plugin creates a redirect loop for the main blog (blog #0), since the URL from get_option() will be http://example.org/wordpress but the if-statement in redirect_to_mapped_domain() expects only http://example.org

    So, what I did was making sure get_original_url() always returns the protocol + domain name ONLY, by adding this piece of code in get_original_url() directly after $orig_url is set from get_option/get_blog_option:

    $orig_url_arr = explode('/', $orig_url);
    if (count($orig_url_arr) > 3) {
        $orig_url = $orig_url_arr[0] . '//' . $orig_url_arr[2];
    }

    This is not the most beautiful solution (since the compared URLs will actually not be the correct ones), but it seems to work fine so far.

    I’m not sure if this solution will also work if you want your wordpress root to be accessed from http://example.org/blog, but I thought this was a related problem/solution, so att decided to share this here. 🙂

    Thanks for a nice plugin! 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘The domain mapping plugin only works if the site is installed in /’ is closed to new replies.