Title: Script and style URLs have HTTPS changed to HTTP
Last modified: August 21, 2016

---

# Script and style URLs have HTTPS changed to HTTP

 *  [boxcarpress](https://wordpress.org/support/users/boxcarpress/)
 * (@boxcarpress)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/script-and-style-urls-have-https-changed-to-http/)
 * Am using WP 3.7.1 and WPMUDM 0.5.4.3.
 * On an SSL page, domain_mapping_plugins_uri() and domain_mapping_themes_uri() 
   were changing a $full_url with an explicit “[https://&#8221](https://&#8221);
   scheme to an URL with “[http://,&#8221](http://,&#8221); stripping the “s”.
 * I have rewritten these two functions to return the proper scheme. This seems 
   to mirror the behavior of plugins_url(). Not sure why this issue popped up, but
   I hope this helps others. And perhaps this could be added to the plugin for a
   future release.
 * **/wordpress-mu-domain-mapping/domain-mapping.php:642**
 *     ```
       function domain_mapping_plugins_uri( $full_url, $path=NULL, $plugin=NULL ) {
       	$url = get_option( 'siteurl' ) . substr( $full_url, stripos( $full_url, PLUGINDIR ) - 1 );
       	return empty($_SERVER['HTTPS']) ? $url : str_replace( 'http://', 'https://', $url );
       }
   
       function domain_mapping_themes_uri( $full_url ) {
       	$url = str_replace( get_original_url ( 'siteurl' ), get_option( 'siteurl' ), $full_url );
       	return empty($_SERVER['HTTPS']) ? $url : str_replace( 'http://', 'https://', $url );
       }
       ```
   
 * [http://wordpress.org/plugins/wordpress-mu-domain-mapping/](http://wordpress.org/plugins/wordpress-mu-domain-mapping/)

The topic ‘Script and style URLs have HTTPS changed to HTTP’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-mu-domain-mapping.svg)
 * [WordPress MU Domain Mapping](https://wordpress.org/plugins/wordpress-mu-domain-mapping/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-mu-domain-mapping/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/reviews/)

## Tags

 * [domain mapping](https://wordpress.org/support/topic-tag/domain-mapping/)
 * [HTTPS](https://wordpress.org/support/topic-tag/https/)
 * [plugins_url](https://wordpress.org/support/topic-tag/plugins_url/)
 * [SSL](https://wordpress.org/support/topic-tag/ssl/)

 * 0 replies
 * 1 participant
 * Last reply from: [boxcarpress](https://wordpress.org/support/users/boxcarpress/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/script-and-style-urls-have-https-changed-to-http/)
 * Status: not resolved