Support » Plugin: WordPress HTTPS (SSL) » Need ideas for multiple domain solution

  • Resolved jmaurer

    (@360zen)


    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.

    https://wordpress.org/plugins/wordpress-https/

Viewing 1 replies (of 1 total)
  • Thread Starter jmaurer

    (@360zen)

    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://. 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 multiple domain solution’ is closed to new replies.