WordPress MU Domain Mapping
Issue in domain_mapping_post_content function (3 posts)

  1. ctrl-alt-esc
    Posted 4 years ago #

    The Setup:
    WordPress 3.2.1 installed in subdirectory mode at http://blogs.example.com
    Domain mapping plugin

    http://blogs.example.com/lhs_guidance - domain mapping not enabled on this site

    http://blogs.example.com/lhs - this site has domain mapping enabled and uses http://lhs.example.com as the primary domain. This site contains a link to http://blogs.example.com/lhs_guidance in the content of a page.

    The Problem:
    When viewing that page, the url is incorrectly converted to http://lhs.example.com_guidance/

    The fix:
    In domain_mapping_post_content change:
    return str_replace( $orig_url, $url, $post_content );
    return preg_replace( '/' . preg_quote( $orig_url, '/') . '\b/', $url, $post_content );

    This seems to be working ok on my site. Not sure if it will cause issues for other setups.


  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 4 years ago #

    Did you edit the site in network admin and change the URL?

  3. ctrl-alt-esc
    Posted 4 years ago #

    No, I haven't edited any urls for either of the two sites.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress MU Domain Mapping
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic