Support » Plugin: Multiple Domain » Disable media URL replace

  • Resolved Sayan Datta



    Could you please tell me how to disable media url replace to avoid duplicate content in search engines?


Viewing 1 replies (of 1 total)
  • Plugin Contributor Gustavo Straube



    You can try removing some filters used by the plugin. This way:

    $multipleDomain = MultipleDomain::instance();
    remove_filter('content_url', [ $multipleDomain, 'fixUrl' ]);
    remove_filter('wp_get_attachment_url', [ $multipleDomain, 'fixUrl' ]);
    remove_filter('upload_dir', [ $multipleDomain, 'fixUploadDir' ]);
    remove_filter('the_content', [ $multipleDomain, 'fixContentUrls' ], 20);

    You may add/remove lines to the snippet above according to your needs. The hookFilters function contains all the filters used by the plugin:


Viewing 1 replies (of 1 total)
  • The topic ‘Disable media URL replace’ is closed to new replies.