[wp-hackers] SSL for a single page

Kimmo Suominen kimmo at global-wire.fi
Fri Oct 17 10:57:20 GMT 2008


On Fri, Oct 17, 2008 at 09:46:41AM +0100, Rich Pedley wrote:
> 2008/10/16 Peter Westwood <peter.westwood at ftwr.co.uk>:
> > Rich Pedley wrote:
> 
> >> Sorry, my bad:
> >> http://checkout.google.com/support/sell/bin/answer.py?hl=en&answer=42917
> >>
> >>
> >
> > Reading that the SSL page is not public facing but just for Google callback?
> >
> > 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?

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);
    }

Best regards,
+ Kimmo
-- 
<A HREF="http://kimmo.suominen.com/">Kimmo Suominen</A>



More information about the wp-hackers mailing list