WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MU Domain Mapping
Feature Request: HTTP Only / protocol selection option (4 posts)

  1. slacker_n23
    Member
    Posted 2 years ago #

    Hiya,

    Fantastic plugin, we are using this on network23.org and it is very popular and useful.

    I have one issue and have been forced to patch the code slightly.

    We use https:// for the main network23 site, and we have an ssl certificate for this.

    But user sites don't usually have (or want to buy) their own certificate so they just want to run on http://

    However: it always redirects to the same protocol, meaning we get 'invalid certificate' errors. Also in the 'Active domains on this blog' list it displays the https:// protocol which is a bit confusing.

    So for now I made a very simple patch:

    453c453,454
    <       $protocol = ( 'on' == strtolower( $_SERVER[ 'HTTPS' ] ) ) ? 'https://' : 'http://';
    ---
    > #     $protocol = ( 'on' == strtolower( $_SERVER[ 'HTTPS' ] ) ) ? 'https://' : 'http://';
    >       $protocol = 'http://';
    546c547,548
    <               $protocol = ( 'on' == strtolower( $_SERVER[ 'HTTPS' ] ) ) ? 'https://' : 'http://';
    ---
    > #             $protocol = ( 'on' == strtolower( $_SERVER[ 'HTTPS' ] ) ) ? 'https://' : 'http://';
    >               $protocol = 'http://';

    However, I'm wondering if this could be made into an option in the plugin settings for a future release, if it seems useful to others?

    Could either allow selection of the default domain mapping protocol, or allow selection per domain?

    Regards,

    slacker x

    http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 2 years ago #

    Thanks :)

    I have an extensive patch for SSL that someone sent me a few months ago that I haven't got to yet. I am hoping to get that into DM sometime in the coming month.

  3. Matthew Boynes
    Member
    Posted 2 years ago #

    I'd like to add a suggestion on to this. I'm in a similar boat as slacker x, but what I'd like to do is, if the protocol is https, stay at the subdomain and not redirect (that way, my sites can all leverage my wildcard SSL certificate). What I'd suggest is adding an apply_filter within redirect_to_mapped_domain so that people can hook into this and choose to redirect or not.

    Is this the official repo for this plugin? https://github.com/inxilpro/Wordpress-Domain-Mapping -- if so, I can pull it and make my proposed changes. I'm very happy to assist with the development!

    Thanks,
    Matt Boynes

  4. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 2 years ago #

    Is this the official repo for this plugin? https://github.com/inxilpro/Wordpress-Domain-Mapping

    No, I wasn't even aware that repo existed. You can go ahead and do your thing with it, but I won't be notified of anything you do.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic