• Resolved Sayan Datta

    (@infosatech)


    Hello,

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

    Thanks!

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

    (@gustavostraube)

    Hello!

    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: https://github.com/straube/multiple-domain/blob/master/multiple-domain/MultipleDomain.php#L240

    Regards

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