[wp-hackers] SSL for a single page

Rich Pedley elflop at googlemail.com
Fri Oct 17 11:13:52 GMT 2008


2008/10/17 Kimmo Suominen <kimmo at global-wire.fi>:
> On Fri, Oct 17, 2008 at 09:46:41AM +0100, Rich Pedley wrote:

>> > If so, you can use two WP installs pointing at the same db but use the
>> > defines WP_SITEURL and WP_HOME in wp-config.php to set the urls different so
>> > the SSL one doesn't auto redirect the google callback.
>>
>> clever, but not suitable for general usage.
>
> Why not?

because you are suggesting that people require 2 installations of Wordpress!

> Also, you could avoid having to install a second WP instance by
> checking the value of $_SERVER['HTTP_HOST'] in wp-config.php.
>
> Something like this:
>
>    if (!isset($_SERVER['HTTP_HOST'])
>        || !strcmp($_SERVER['HTTP_HOST'], 'myvirtualsite.example.com')
>    ) {
>        define('WP_SITEURL', 'https://mysharedsite.example.com/~me');
>        define('WP_HOME', WP_SITEURL);
>    }

I'd tried something similar to that early on. Unfortunately it doesn't
appear to work, at least for me. I've always assumed this was because
of a core WP function.

Rich
-- 
my mind is on a permanent tangent
http://cms.elfden.co.uk/


More information about the wp-hackers mailing list