How can I redirect a Specific Page URL for SSL Purposes?

Team WPMU,

I have a multisite network set to provide subdomains, with WPMU Domain Mapping, MarketPress, and Infinite SEO (as well as others) installed on the site, as well as a wildcard SSL certificate.

One of the members has mapped his domain and wants to take advantage of MarketPress, but does not want to use Paypal. As expected, the wildcard SSL is not carrying through and the force SSL function to utilize a payment gateway is throwing an error -- the subdomain address is not. = error = good

I understand why the SSL cert won't carry through to the mapped domain, but is there a way to disable the mapping for that specific URL so the payment gateway will function properly? The rest of the site does not need to be SSL -- just that one page.


    • The Bug Hunter

    Hey @jetmac I'm struggling with some similar issues and might have a few resources to point you towards.

    (my thread is

    I recently found two good looking resources on passing requests through by the page...


    Hope thats helpful. I'd love to know how it goes... I'll likely need to do some similar things down the road.


  • jetmac
    • Recruit

    Thanks, Max, but I've been down those resources already.

    The larger issue is that eventually I'll need a way for it to propogate across anyone else who maps their domain. I hope that the next gen of Domain Mapping or MarketPress 3.0 makes this process a little easier (as Checkout will then have it's own page). But, until then, I need an actual solution to this problem.

    The user can try using Paypal, which handles the SSL for them, but that is, IMO, not a solution. Equally so with having the user buy their own SSL cert for that domain -- if the service we provide for them can't do it, then it's not really a service.

    There must be a way we can configure the checkout page of a mapped domain to be covered under the larger SSL, and the best way I see to do that is to force that single page to use the subdomain address. But, 301 redirect just ends up in an ongoing loop. The Yoast solution is like using a nuclear weapon to swat flies -- it might work once, but it won't scale to a dozen instances.

    I'm confident that the WPMU team can figure this out.

  • Vaughan
    • Support/SLS MockingJay

    Hi @jetmac,

    Currently this isn't possible with mapped domains.

    The only way I can think of is with a multi-domain SSL which allows you to add multiple domains to a cert. These are very expensive though.

    The developers are looking in to ways of doing this in a future release, but at this time, it's not possible.

    Hope this helps

  • jetmac
    • Recruit

    I'm sorry, Vaughn, but I don't accept that as an answer. There is always a way.

    I'm looking into multi-domain certs, but surely there is a method that can redirect to the subdomain address or force it in some way? I have no qualms about dipping into code, I just don't know what to add to make it work.

    There are at least a dozen threads about this topic, it is obviously an issue. I'm willing to try things if you are, so let's work this thing out.

  • Vaughan
    • Support/SLS MockingJay

    Hi @jetmac,

    As I said, the developers are looking into this, but at this time it's currently not possible. This is the issue with all multisites with domain mapping (Not just our domain mapping plugin, but others too)

    I can ask one of our developers to have a look into it again, but it's a rather complex issue that they haven't managed to solve yet.

    Hope this helps

  • jetmac
    • Recruit

    Thanks, Vaughn, I appreciate the efforts.

    I know the issue with mapped domains and SSL is quite widespread and, most likely will not be overcome - it is in direct opposition to what SSL does. That's why I feel a redirect of some kind is necessary - can such a targeted redirect be established in wp-config or sunrise? Earlier threads sounded like they were close, but no one ever published their solution.

  • Jack Kitterhing
    • Code Norris

    Hi there @jetmac,

    Hope you're well today! :slight_smile:

    I see Vaughan has indeed notified one of the developers here, wp-config.php most likely wouldn't work for this, the sunrise would be the most natural place.

    Of course you could tr with some advanced .htaccess and request any domain that is the shopping cart page be redirect to the sub domain, but to be honest that isn't over suitable and I can't see it working.

    I see Aaron has responded in the other thread, it appears that it'll be possible in 3.0 of MarketPress and perhaps a updated version of Domain Mapping, but it's currently, though of course we'll see what the developer says. :slight_smile:


    Kind Regards

  • Sam
    • The Incredible Code Injector

    Hello @jetmac

    If the user is already under SSL, domain mapping won't force the user to be on mapped domain and they can keep being on original domain ( or subdomain in your instance). Please note that SSL error for a domain name without a cert happens even before PHP is loaded.

    Please take a look at wp-content/plugins/domain-mapping/classes/Domainmap/Module/Mapping.php line:206

    You can hook to this filter to prevent redirect to mapped domain on any desired page.

    Also dm_site_url and dm_home_url functions return site_url and home_url with the original domain, these may be handy as well.

    You may consult their documentation in this file wp-content/plugins/domain-mapping/domain-mapping.php ( they are the two last functions )

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.