Title: Need ideas for HTTPS multiple domain solution
Last modified: August 22, 2016

---

# Need ideas for HTTPS multiple domain solution

 *  Resolved [justinmaurerdotdev](https://wordpress.org/support/users/360zen/)
 * (@360zen)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/need-ideas-for-https-multiple-domain-solution/)
 * Hi there,
    I’m developing a WordPress site that runs on multiple domains (not
   WordPress MU). The two domains are served from the same codebase and I have written
   a plugin that successfully switches themes based on the URL.
 * This site has a donation form that uses HTTPS (currently using the WordPress 
   HTTPS plugin). However, WordPress HTTPS only has one option for the domain.
 * I thought that I could maybe get away with replacing this line
    `$ssl_host = 
   rtrim($this->getSetting('ssl_host'), '/') . '/';`
 * …with this
    `$ssl_host = $_SERVER['SERVER_NAME'] . '/';`
 * Unfortunately, it’s not that easy. It seems to break the whole site. The site
   header (and consequently everything else) won’t load properly.
 * Any ideas? Any help here would be much appreciated.

Viewing 1 replies (of 1 total)

 *  Thread Starter [justinmaurerdotdev](https://wordpress.org/support/users/360zen/)
 * (@360zen)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/need-ideas-for-https-multiple-domain-solution/#post-5840408)
 * Solved this. I just needed to scrap the plugin and use the following code in 
   my htaccess…AND switch my site/home URL to [https://](https://wordpress.org/support/topic/need-ideas-for-https-multiple-domain-solution/?output_format=md).
   But, now we’re all good.
 * Here’s what I used, in case anyone else has this issue:
 *     ```
       # BEGIN HTTPS REDIRECT
       <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteCond %{HTTPS} off
       RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
       </IfModule>
       # END HTTPS REDIRECT
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Need ideas for HTTPS multiple domain solution’ is closed to new replies.

## Tags

 * [HTTPS](https://wordpress.org/support/topic-tag/https/)
 * [multiple domains](https://wordpress.org/support/topic-tag/multiple-domains/)
 * [SSL](https://wordpress.org/support/topic-tag/ssl/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 1 participant
 * Last reply from: [justinmaurerdotdev](https://wordpress.org/support/users/360zen/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/need-ideas-for-https-multiple-domain-solution/#post-5840408)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
