• Mark Puts

    (@mark-puts)


    Hi Frank,

    With WPML I have the issue that the url of the assets is always on the primary domain and not the domain of the site a visitor is visiting. This causes origin issues and I would like to fix those without setting up allow headers for each site.

    I thought that I could fix this easily by adding this to rule 190 in autoptimize.php but it then only minifies the html. Assets are untouched.

    if ( function_exists('icl_object_id') ) {
    
    		define('AUTOPTIMIZE_WP_SITE_URL', '//'.$_SERVER['HTTP_HOST']);
    		define('AUTOPTIMIZE_WP_CONTENT_URL',content_url());
    	}
    	else

    And when I add this to the content url constant my site dies:
    define(‘AUTOPTIMIZE_WP_CONTENT_URL’,str_replace(get_original_url(AUTOPTIMIZE_WP_SITE_URL),AUTOPTIMIZE_WP_SITE_URL,content_url()));

    What am I doing wrong and how to fix this?

    Thanks!

    https://ww.wp.xz.cn/plugins/autoptimize/

Viewing 1 replies (of 1 total)
  • Plugin Author Frank Goossens

    (@futtta)

    Q; is this a multisite, with an AO settings-screen for each site? or do you have only one AO-settings-screen?

    frank

Viewing 1 replies (of 1 total)

The topic ‘WPML base url’ is closed to new replies.